Automation

 View Only
last person joined: 3 days ago 

Ask questions and share experiences about Apstra, Paragon, and all things network automation.
  • 1.  JUNOSe | where .mac files should be located ?

    Posted 05-13-2011 14:13

    Hello All,

     

    What I would like to ask you is the following :

    JUNOSe scripts (.mac files) are written using the cli macros, but the problem is that I do not have an idea where to store the .mac files. Could you please provide me some guidance on this ?

     

    Thank you.


    #cli
    #.mac
    #macros
    #JUNOSe


  • 2.  RE: JUNOSe | where .mac files should be located ?
    Best Answer

    Posted 05-13-2011 14:44

    The "copy" command will automatically place the .mac file in the correct place on disk.  The "copy" command recognizes each file type, and manages the files appropriately.  So, just copy the macro file to the E-Series box, just the same way you would copy a script file.

     

    The file operation commands haven't changed in a long time -- you might be running a different release than 12.1, but look here for some examples:

     

    http://www.juniper.net/techpubs/en_US/junose12.1/information-products/topic-collections/swconfig-system-basics/index.html and then select "Chapters | Managing the System |  Transferring Files | copy Command Examples".  In your case, just substitute ".mac" where you see ".scr" in the examples.

     

    Here's a specific example to copy a remote macro file to a JUNOSe ssytem via the CLI file copy command.  The following command creates or replaces the local file some.mac by copying the remote file some.mac located in the directory ftpDir on the host "mary".  This assumes that a host entry for "mary" exists in the system's configuration, so that the IP address, and ftp username and password are known.  (In the example below, I placed extra spaces between the command tokens for readability):

     

    copy  mary:ftpDir/some.mac  some.mac

     



  • 3.  RE: JUNOSe | where .mac files should be located ?

    Posted 05-13-2011 22:27

    thank you for a detailed answer like this 🙂