Skip to content
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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

megkido
Copy link

@megkido megkido commented Oct 19, 2020

Compared /tmp/site.attr generated by ifconfig and ip and no difference was found.

frontend-0-0:/export/src/stacki/test-framework/test-suites/integration/tests/wizard # diff /tmp/site.attrs /tmp/site.attrs.org
16c16
< Kickstart_PrivateRootPassword:<omitted>
---
> Kickstart_PrivateRootPassword:<omitted>

@@ -15,7 +15,7 @@
import ipaddress
import socket
from xml.etree.ElementTree import Element, SubElement, ElementTree

import ipaddress
Copy link
Contributor

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

Copy link
Author

Choose a reason for hiding this comment

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

duhhhh

@megkido megkido force-pushed the feature/no-more-ifconfig branch from 6b74538 to 70b5d60 Compare October 20, 2020 16:27
@@ -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))
Copy link
Contributor

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.

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