-
Notifications
You must be signed in to change notification settings - Fork 74
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
FEATURE: STACKI-1631 Remove ifconfig and replace with ip #845
base: develop
Are you sure you want to change the base?
Conversation
@@ -15,7 +15,7 @@ | |||
import ipaddress | |||
import socket | |||
from xml.etree.ElementTree import Element, SubElement, ElementTree | |||
|
|||
import ipaddress |
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.
this looks like it's already imported
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.
duhhhh
6b74538
to
70b5d60
Compare
@@ -131,10 +130,11 @@ def setNetwork(self, interface, mac, addr, netmask): | |||
if os.path.exists(ifDhcpFile): | |||
os.remove(ifDhcpFile) | |||
# Force network reconfiguration | |||
cmd = ['/sbin/ifconfig', interface, addr, 'netmask', netmask] | |||
ip_mask = ipaddress.ip_interface(join(addr,'/',netmask)) |
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.
Where is this join
function coming from? The syntax for joining a string together with join
is:
'\'.join([addr, netmask])
. I believe this would throw a NameError
exception. Which means your test is likely not causing this code to run.
I looked at last night's coverage report, and the setNetwork
function isn't being called by any of the tests in develop
. So, it is possible that setNetwork
is dead code. You'll need to trace it down and see if anything calls it.
Also: You can get a coverage report for your own branch by either adding _cov
to the end of your branch name or by putting the work coverage
in the last commit message.
Compared
/tmp/site.attr
generated by ifconfig and ip and no difference was found.