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

[openwrt] Allow configure DNS resolvers without the need of defining #129

Closed
wants to merge 1 commit into from

Conversation

NoumbissiValere
Copy link
Contributor

interfaces #117

Fixed the issue by defining two additional classes (DnsServer and
DnsSearch) in the interfaces
converter. These additional classes are to convert the dns configs when
an interface is not provided in the netjson. when an interface is provided, the default
converters in the Interface class is used to convert the dns to native
config. this was left so because when an interface is defined, other
options like DHCP servers might be available and the Interface class
handles that very well.
Test cases were added to test for these features and also to increase
the coverage.

Fixes #117

…openwisp#117

Fixed the issue by defining two additional classes (DnsServer and
DnsSearch) in the interfaces
converter. These additional classes are to convert the dns configs when
an interface is not provided in the netjson. when an interface is provided, the default
converters in the Interface class is used to convert the dns to native
config. this was left so because when an interface is defined, other
options like DHCP servers might be available and the Interface class
handles that very well.
Test cases were added to test for these features and also to increase
the coverage.

Fixes openwisp#117
@coveralls
Copy link

Coverage Status

Coverage increased (+0.002%) to 99.933% when pulling 229ace1 on NoumbissiValere:issue/117 into c23ce97 on openwisp:master.

@NoumbissiValere
Copy link
Contributor Author

@nemesisdesign @atb00ker please can you review this when you have time? Thanks 😄

})
expected = self._tabs("""package network

config dns 'dns'
Copy link
Member

Choose a reason for hiding this comment

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

this doesn't look like something that would work on OpenWRT, can you provide the piece of documentation of OpenWRT which explains that this would work? Have you tested this on an actual OpenWRT device?

Copy link
Contributor Author

@NoumbissiValere NoumbissiValere Mar 24, 2019

Choose a reason for hiding this comment

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

Hmmmm, @nemesisdesign . I just followed standards and conversion used in other tests. I don't have an actual OpenWRT device. will love to have one but can't afford it now. Please can you tell me what is wrong with the code so that i try to correct it? thanks

Copy link
Member

Choose a reason for hiding this comment

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

@NoumbissiValere You can make an OpenWRT VM on your laptop in the meanwhile for testing.
This should help: http://openwisp.io/docs/user/configure-device.html#install-openwrt-on-virtualbox

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the help @atb00ker

Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

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

The resulting code must be tested on OpenWRT to ensure the desired result is reached, otherwise is not only useless, but harmful, because it adds code that confuses developers and adds configurations on the device that confuse the more experienced OpenWRT users

@NoumbissiValere
Copy link
Contributor Author

The resulting code must be tested on OpenWRT to ensure the desired result is reached, otherwise is not only useless, but harmful, because it adds code that confuses developers and adds configurations on the device that confuse the more experienced OpenWRT users

Ok @nemesisdesign i will get the work together with subsequent work tested on openWRT before sending. Thanks for the corrections

@nemesifier nemesifier closed this Dec 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[openwrt] Allow configure DNS resolvers without the need of defining interfaces
4 participants