openwisp / openwisp/netjsonconfig

[change] Allow variables everywhere

Open
#223 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
388
Forks
87
Avg merge
1h 26m
Merged PRs (30d)
4

Description

Right now variables are allowed only in strings.

However, I wonder if we can, when parsing the NetJSON config, evaluate it as a string first, perform any variable substitution before the JSON parsing, and then continue with the flow, that could allow having variables defined anywhere and it could allow variables to be different types.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how NetJSON configuration is parsed and where variable substitution currently occurs for strings. Compare the existing parsing flow with the requested behavior, and define done as variables being accepted anywhere in the configuration while retaining appropriate value types.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.