Scrapli - Asynchronous Network Automation

Поділитися
Вставка
  • Опубліковано 30 вер 2024
  • Check out the Scrapli docs here: carlmontanari....
    Check Scrapli out on Github: github.com/car...

КОМЕНТАРІ • 25

  • @Gtv7020
    @Gtv7020 3 роки тому +2

    Congratulations on 1st Class Honors!

    • @IPvZero
      @IPvZero  3 роки тому

      Thanks, Gezahegn! I really appreciate it :)
      -John

  • @1983Moseley
    @1983Moseley 3 роки тому +2

    Hey dude, I've been listening to the Hangouts on the train. Very interesting. I'm so chuffed that you got a 1st at Uni. That's massive. Well done brother!

    • @IPvZero
      @IPvZero  3 роки тому +1

      Thanks, brother! Was a lot of work but worked it in the end :)

  • @jimwelch707
    @jimwelch707 Рік тому

    I came across this video and implemented everything as suggested and even though I have installed the scrapli[asyncssh] library I get this error: ModuleNotFoundError: No module named 'scrapli_asyncssh:'. Then after the error it offers he following for a solution 'pip install scrapli[asyncssh]. After searching the web for a solution and not finding any, I thought perhaps someone on this thread might have a fix. Any ideas, anyone? Running Python 3-11

  • @barbossa1677
    @barbossa1677 Рік тому

    Awesome demo
    Are you John McGovern ? the trainer at cbt nuggets ?
    you sounds familiar

  • @mc-rt2xg
    @mc-rt2xg 8 місяців тому

    Thank you! I have tried it too and it works really fast!

  • @qman2852
    @qman2852 3 роки тому +1

    What are the advantages of async with Scrapli vs nornir with Scrapli?

    • @IPvZero
      @IPvZero  3 роки тому +4

      Hey Qman. Nornir with Scrapli is also a very good option. However, Nornir does use threading and as you scale out your network, particularly when dealing with thousands of devices, threads can become resource heavy and costly. At the scale of a few hundred devices I cant imagine you'd notice any great difference, if at all. Dealing with a massive number of devices, though, asyncio will produce faster and more scalable results. To quote from a Real Python article:
      "For I/O-bound problems, there’s a general rule of thumb in the Python community: 'Use asyncio when you can, threading when you must.'”
      Hope that helps :)

  • @carlosmontero6777
    @carlosmontero6777 3 роки тому +1

    This is great! Thanks for sharing

    • @IPvZero
      @IPvZero  3 роки тому

      Thanks Carlos!!

  • @muhammad.rafi2012
    @muhammad.rafi2012 3 роки тому

    ahh John, thanks for remembering back to your UA-cam password :P

    • @IPvZero
      @IPvZero  3 роки тому +1

      Haha thanks Muhammad! Hopefully be a lot more active now :)

  • @blaineturner6547
    @blaineturner6547 2 роки тому

    Great overview of both Scrapli and async. Been talking with colleagues about async operations and for some reason was fuzzy on the terminology until this vid helped hammer it home. Thanks for taking the time to put this together!

    • @IPvZero
      @IPvZero  2 роки тому

      Thanks so much, Blaine. I really appreciate your kind words and hearing your feedback :)
      -John

  • @eddurguti
    @eddurguti 2 роки тому

    Hi John, can you limit on how many devices you can access at a time, I have about 10k and was thinking maybe doing 100 at a time?

    • @IPvZero
      @IPvZero  2 роки тому +1

      Hey, Ed. You could use something like a semaphore within Asyncio which will manage an internal counter to break up the concurrency. So you could do it in blocks of 100. That said, if you plan to do only 100 connections at a time I can't imagine youd see much performance difference of using asyncio over threading. In that case, it's probably way easier to use the Nornir framework (and the nornir_scrapli plugin for the connections). Your concurrency will be implemented automatically with threading and you will get the benefit of built in inventory management and cool filtering features. This makes it way easier. I have a couple of videos on how to do such a thing:
      Simple filtering with Nornir: ua-cam.com/video/dnvcg5Hi4S0/v-deo.html
      Advanced filtering with Nornir:
      ua-cam.com/video/mlPdiM_jmUA/v-deo.html
      Or if you wanna stick with Asyncio - look towards using semaphores. Although i havent written any such examples for that as of yet :)
      Hope that helps!
      -John

    • @eddurguti
      @eddurguti 2 роки тому

      @@IPvZero thank you. I probably need to start looking into nornir. Love your videos man.

    • @IPvZero
      @IPvZero  2 роки тому

      @@eddurguti Thanks, brother. Genuinely appreciate the kind words :)

  • @djmezza1
    @djmezza1 3 роки тому

    Congratulations John!

    • @IPvZero
      @IPvZero  3 роки тому

      Thanks, Ryan. Really appreciate it man :)

  • @damianbrathwaite4918
    @damianbrathwaite4918 3 роки тому

    Congratulations to you.

    • @IPvZero
      @IPvZero  3 роки тому

      Thanks, Damian!!

  • @jaimerosariojusticia
    @jaimerosariojusticia 3 роки тому

    Awesome!

    • @IPvZero
      @IPvZero  3 роки тому

      Thanks Jaime! :)