Automation

 View Only
last person joined: 6 days ago 

Ask questions and share experiences about Apstra, Paragon, and all things network automation.

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
    ------------------------------