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

The asterisks at the end of the key_name are removed #97

Closed
myxx921 opened this issue Feb 6, 2023 · 0 comments
Closed

The asterisks at the end of the key_name are removed #97

myxx921 opened this issue Feb 6, 2023 · 0 comments

Comments

@myxx921
Copy link

myxx921 commented Feb 6, 2023

hi, I try use key_value as key_name of group interfaces.{{ sap }}
if the key_value ends with an asterisk in the dictionary key, this asterisk disappears

data = """
interface "port lag-4:1629" create
    sap lag-4:1629.* create
exit
"""

template = """
<group name="interfaces.{{ sap }}**">
interface "{{ interface | ORPHRASE | _start_ }}" {{ ignore }}
    sap {{ sap | _exact_ }} {{ ignore }}
exit {{ _end_ }}
</group>
"""

[{'interfaces': {'lag-4:1629.': {'interface': 'port lag-4:1629'}}}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants