Skip to content

Commit 05583bc

Browse files
committed
Fix: add netlab environment variables to reporting environment
The 'netlab report' command used the transformed topology snapshot as the source of reporting data, which prevented the report modification with environment variables (use case: #2562). This change adds NETLAB_ environment variables to the topology data, allowing users to modify report contents with environment variables.
1 parent 4247998 commit 05583bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

netsim/cli/report.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from . import load_snapshot,_nodeset,parser_lab_location,parser_add_verbose
1010
from ..outputs import _TopologyOutput, common as outputs_common
11-
from ..utils import strings,log
11+
from ..utils import strings,log,read as _read
1212

1313
#
1414
# CLI parser for 'netlab report' command
@@ -36,6 +36,7 @@ def report_parse(args: typing.List[str]) -> argparse.Namespace:
3636
def run(cli_args: typing.List[str]) -> None:
3737
args = report_parse(cli_args)
3838
topology = load_snapshot(args)
39+
_read.include_environment_defaults(topology)
3940
report_module = _TopologyOutput.load(
4041
f'report:{args.report}={args.output or "-"}',
4142
topology.defaults.outputs.report)

0 commit comments

Comments
 (0)