Automation

IMPORTANT MODERATION NOTICE

This community is currently under full moderation, meaning  all posts will be reviewed before appearing in the community. Please expect a brief delay—there is no need to post multiple times. If your post is rejected, you'll receive an email outlining the reason(s). We've implemented full moderation to control spam. Thank you for your patience and participation.



Junos PyEZ (set command & edit mode)

  • 1.  Junos PyEZ (set command & edit mode)

    Posted 10-18-2021 05:24

    Hi My Friend,

    We're using Python (Junos PyEZ) to deploy configuration to Juniper MX router.  Everything is OK for "set" command. 

    How can I deploy non-set command configuration such as ANNOTATE via Junos PyEZ? Thanks.


    Normally we have to add annotate under edit mode (edit edit firewall filter AE207)
    term VLAN2841 {
    /* ANNOTATE FROM COMMENT VLAN2841 */
    from {
    /* ANNOTATE FROM COMMENT ae207.2841 */
    interface ae207.2841;
    }
    then {
    /*ANNOTATE FROM COMMENT POLICER */
    policer 100M;
    accept;
    }


    Display Set Command (can't find ANNOTATE)
    set firewall filter AE207 term VLAN2841 from interface ae207.2841
    set firewall filter AE207 term VLAN2841 then policer 100M
    set firewall filter AE207 term VLAN2841 then accept

    ------------------------------
    Benjamin CL
    ------------------------------