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.



  • 1.  Delete routing-instance through REST API not works

    Posted 04-15-2021 07:02
    Hi! Experts

    I want to delete a specific routing-instance through REST API, but below XML doesn't work and have a "statement has no contents; ignored" warning response. Could you pls shed some light on this? Thanks in advance.

    REST API Post XML:
    <lock-configuration/>
    <load-configuration>
    <configuration>
    <routing-instances>
    <instance>
    <name operation="delete">evpn-2000</name>
    </instance>
    </routing-instances>
    </configuration>
    </load-configuration>
    <commit/>
    <unlock-configuration/>


    JUNOS Response:
    ...
    <source-daemon>mgd</source-daemon>
    <edit-path>[edit routing-instances]</edit-path>
    <statement>evpn-2000</statement>
    <message>statement has no contents; ignored</message>
    </xnm:warning>
    <load-success/>
    </load-configuration-results>Content-Type: application/xml; charset=utf-8
    <commit-results xmlns:junos="http://xml.juniper.net/junos/*/junos">
    <routing-engine junos:style="normal">
    <name>re0</name>
    <commit-success/>
    <commit-revision-information>
    <new-db-revision>re0-1618497689-71</new-db-revision>
    <old-db-revision>re0-1618497593-70</old-db-revision>



  • 2.  RE: Delete routing-instance through REST API not works

    Posted 04-15-2021 21:53
    I tried it out, this works.

    <lock-configuration/>
    <load-configuration>
        <configuration>
            <routing-instances>
                <instance  operation="delete">
                    <name>evpn-2000</name>
                </instance>
            </routing-instances>
        </configuration>
    </load-configuration>
    <commit/>
    <unlock-configuration/>