-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
Raspbian Backend (1st phase) #89
Conversation
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.
See my inline comments plus the following:
templates are rather unreadable. You need to improve their readability in some way, starting from the names of variables.
|
||
|
||
class RaspbianConverter(BaseConverter): | ||
def test_function(self): |
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.
what's this for?
Raspbian Backend | ||
""" | ||
schema = schema | ||
env_path = 'netjsonconfig.backends.raspbian' |
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 shouldn't be needed anymore, try removing it
{% if i|string() == 'general' %} | ||
{% for general in j %} | ||
{% if general.get('hostname') %} | ||
config: /etc/hostname |
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.
are you sure this line doesn't make the configuration invalid when deployed on an actual device?
Shouldn't it be # config: /etc/hostname
?
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.
Yes. I'll comment it out.
{% for interface in j %} | ||
{% if interface.get('iftype') == 'wireless' %} | ||
{% if interface.get('mode') == 'adhoc' %} | ||
config: /etc/network/interfaces |
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.
are you sure this line doesn't make the configuration invalid when deployed on an actual device?
Shouldn't it be # config: /etc/network/interfaces
?
@@ -0,0 +1,8 @@ | |||
{% for i, j in data.items() %} | |||
{% if i|string() == 'ntp' %} | |||
config: /etc/ntp.conf |
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.
same as previous comment
{% for i, j in data.items() %} | ||
{% if i|string() in ['dns_servers', 'dns_search'] %} | ||
{% if count == [1] %} | ||
config: /etc/resolv.conf |
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.
same as previous comment
expected = '''''' | ||
self.assertEqual(o.render(), expected) | ||
|
||
@unittest.skip('Test skipping') |
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.
what about this test skipping thing?
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.
Not implemented
''' | ||
self.assertEqual(o.render(), expected) | ||
|
||
@unittest.skip('Test skipping') |
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.
same as previous comment
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.
Not implemented
''' | ||
self.assertEqual(o.render(), expected) | ||
|
||
@unittest.skip('Test skipping') |
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.
what about this test skipping thing?
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.
These are not implemented as of now. So skipping them till I implement it.
…r all config files
Merging raspbian branch of fork to rasbian branch of original repo.
References #78.