Automation

 View Only
last person joined: yesterday 

Ask questions and share experiences about Apstra, Paragon, and all things network automation.
  • 1.  Question on REST support for EX, QFX

     
    Posted 28 days ago

    Hi.

     

     

    I have an EX4300 where I've configured the REST API server to listen on port 3000, but it doesn't seem to be doing so.

     

     

    {master:0}

    lab@ex1> show configuration system services rest 

    http {

        port 3000;

    }

     

    {master:0}

    lab@ex1> show system connections | grep 3000 

     

    {master:0}

    lab@ex1> 

     

     

    I saw the same on a virtual QFX.

     

    Do the EX and QFX devices support REST automation?

     

    Thanks,

    Deepak

     

     


    Juniper Business Use Only



  • 2.  RE: Question on REST support for EX, QFX

    Posted 24 days ago

    Yes, the EX and QFX both support REST. Here is a Feature Explorer page for REST

    For the EX4300, you would need Junos OS 20.2R1. The QFXs are listed as well. I have used REST on both the EX and QFX and haven't had any issues with it, but that doesn't help you with the current situation. 

    I would try: 
    - https instead of http (because, why not?)
    - keeping it super simple, if you are not already. Meaning, no VC or things like sending REST through a port that isn't the management port, and checking if it works.
    - restart/reboot if not in production (again, because why not?)

    jessica@ex3400-24p> show configuration system services rest 
    http {
        port 3000;
    }
    enable-explorer;

    jessica@ex3400-24p> show system connections | grep 3000        
    tcp6       0      0  *.3000                                        *.*                                           LISTEN
    tcp4       0      0  *.3000                                        *.*                                           LISTEN

    % curl http://X.X.X.X:3000/rpc/get-system-information -u "jessica:Password"
    <system-information format="xml">
    <hardware-model>ex3400-24p</hardware-model>
    <os-name>junos</os-name>
    <os-version>21.4R3.15</os-version>
    <serial-number>############</serial-number>
    <host-name>ex3400-24p</host-name>
    </system-information>

    I get the expected results from CLI and cURL. Before you try to fix this, would like to see what the error message is when you try cURL from the shell. 



    ------------------------------
    Jessica Garrison
    ------------------------------