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

Automatic renaming of anonymous sections #38

Closed
8 tasks done
nemesifier opened this issue Jun 13, 2017 · 5 comments
Closed
8 tasks done

Automatic renaming of anonymous sections #38

nemesifier opened this issue Jun 13, 2017 · 5 comments

Comments

@nemesifier
Copy link
Member

nemesifier commented Jun 13, 2017

In order to increase compatibility with the incoming backward conversion feature that will be soon incldued in OpenWISP 2 (see openwisp/netjsonconfig#70), we need to improve the openwisp-uci-autoname script so that it can perform the following:

  • ensure system config types in /etc/config/system are always named system
  • ensure globals config types in /etc/config/network are always named globals
  • rename anonymous switches according to the netjsonconfig switch rendering output
  • ensure anonymous wifi interfaces are named wifi_<ifname>
  • ensure routes are named progressively, eg: route1, route2, route3
  • ensure rules are named progressively, eg: rule1, rule2, rule3
  • ensure leds are named as led_<lowercase_name>
  • any other configuration item should be named as <type><number>, for example in case of /etc/config/firewall, the first forwarding rule will be named: forwarding1
@nemesifier nemesifier self-assigned this Jun 13, 2017
@nemesifier nemesifier changed the title Automatic naming of specific sections Automatic renaming of anonymous sections Dec 30, 2017
@nemesifier nemesifier added this to To do (OpenWRT/LEDE) in OpenWISP Contributor's Board Apr 29, 2018
@okraits
Copy link
Member

okraits commented Sep 12, 2018

Another requirement, especially for /etc/config/firewall, is that the order of the sections in the files must be preserved. Right now the order is mixed up which breaks the configuration.

@okraits
Copy link
Member

okraits commented Sep 12, 2018

I will start to work on this tomorrow.

Edit: I created #57 to work on this.

@okraits
Copy link
Member

okraits commented Sep 14, 2018

Todos:

  • ensure system config types in /etc/config/system are always named system
  • ensure globals config types in /etc/config/network are always named globals
  • ensure defaults config types in /etc/config/firewall are always named defaults
  • rename anonymous switches according to the netjsonconfig switch rendering output
  • ensure anonymous wifi interfaces are named wifi_<ifname>
  • ensure routes are named progressively, eg: route1, route2, route3
  • ensure rules are named progressively, eg: rule1, rule2, rule3
  • ensure leds are named as led_<lowercase_name>
  • any other configuration item should be named as <type><number>, for example in case of /etc/config/firewall, the first forwarding rule will be named: forwarding1
  • fix unit tests

@nemesifier
Copy link
Member Author

@okraits I see good progress in the PR!

@nemesifier nemesifier moved this from To do (OpenWRT/LEDE) to In progress in OpenWISP Contributor's Board Sep 14, 2018
@okraits
Copy link
Member

okraits commented Sep 18, 2018

@nemesisdesign I'm done - please review #57.

OpenWISP Contributor's Board automation moved this from In progress to Done Sep 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants