-
-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
python 3.8 and ttp-0.9.2
The input:
interfaces {
ge-* {
unit * {
forwarding-class BE;
}
}
xe-* {
unit * {
forwarding-class BE;
}
}
}
The template:
<group name="interfaces">
interfaces { {{ _start_ }}
<group name="interface-set.{{ interface-set}}">
interface-set {{ interface-set | _start_ }} {
excess-bandwidth-share {{ excess-bandwidth-share | _line_ }};
output-traffic-control-profile {{ output-traffic-control-profile }};
} {{ _end_ }}
</group>
<group name="interface.{{ interface }}">
{{ interface | _start_ }} {
apply-groups {{ apply-groups }};
shaping-rate {{ shaping-rate}};
output-traffic-control-profile {{ output-traffic-control-profile }};
<group name="unit.{{ unit }}">
unit {{ unit | _start_ }} {
apply-groups {{ apply-groups }};
output-traffic-control-profile {{ output-traffic-control-profile }};
<group name="classifiers*">
classifiers { {{ _start_ }}
{{ classifier | _line_ }};
} {{ _end_ }}
</group>
} {{ _end_ }}
</group>
} {{ _end_ }}
</group>
} {{ _end_ }}
</group>
The expected result:
{
"interfaces": {
"interface": {
"ge-*": {
"unit": {
"*": {
"forwarding-class": "BE"
}
}
},
"xe-*": {
"unit": {
"*": {
"forwarding-class": "BE"
}
}
},
}
}
The actual result:
{
'interfaces': {
'interface': {
'ge-': [
{
'unit': {
'': []
}
}
],
'xe-': [
{
'unit': {
'': []
}
}
],
}
}
}
How to escape the ending * (asterisk) in the template attribute value?
Metadata
Metadata
Assignees
Labels
No labels