No video

NetBox Zero To Hero - Video 11 - Custom Scripts

  Рет қаралды 7,520

NetBox Labs

NetBox Labs

Күн бұрын

Hello and welcome to module 11 of the NetBox 'Zero-to-Hero' course. zerotohero.net...
Now it's time for the Brisbane office to 'go live', so Eric is going to use a custom script to Update the status of the Site, and all Locations, Racks, Devices, Clusters and VMs at the site from `Planned` to `Active`. Using a script to do this will be much quicker and more convenient than having to go into each section of the NetBox UI to update the status of all the objects. He can simply run the script to update everything in a couple of seconds!
Eric's boss has also just informed him that a new branch office is planned for Stockholm, Sweden and that he should plan for this also. As the company has standardized on the same network equipment for all branch office locations, Eric is going to use another Custom Script to create the planned site, as well as the network devices that he is planning to deploy there.
By the end of this module you will be able to:
- Describe what Custom Scripts are in NetBox and what kind of tasks they can be used to accomplish
- Understand the basics of writing Custom Scripts and also where to find documentation to help you develop your own scripts
- Kick start your own Custom Scripts collection, with two example scripts to get you up and running
Get Hands On
If you'd like to follow along with the examples used in this course, it's super easy to do, and you have a few options:
1. Run NetBox as a container with NetBox Docker - github.com/net.... - This is the quickest way to get your own dedicated NetBox instance going and it only takes a few minutes to spin up on your laptop!
2. Follow the official documentation - docs.netbox.de.... and do a full installation of all the NetBox components. These instructions have been tested on Ubuntu and CentOS Linux.
3. Use the public demo instance of NetBox - demo.netbox.dev/
The NetBox version used in the video for this module is `v3.3.2`, and the Custom Script Examples can be found here: github.com/net...
Join the Discussion
If you have any questions as you go through the course then pop on over to the NetBox Zero to Hero channel - netdev-communi.... on the NetDev Community Slack! If you aren't already a member then you can sign up for free at netdev.chat/
Useful Links
- Zero To Hero Git Repo - github.com/net....
- Official NetBox Documentation - docs.netbox.de...
- NetBox Docker - github.com/net....
- NetBox Cloud - www.getnetbox.io/ is a hosted solution offered by NS1

Пікірлер: 6
@seand8030
@seand8030 Жыл бұрын
Wow, thank you! Now I understand the value of custom scripts. It was great to see them put into action, thank you for providing the sample code.
@CupcakePWR
@CupcakePWR Жыл бұрын
Thank you so much for doing these easy-to-follow videos! This is the first I've seen, but I'm going to check out your other videos as well. I'm still new at python but I figure playing around with custom scripts in netbox will be a good learning opportunity for me - as I have a few good usecases I want to be implemented
@NetBoxLabs
@NetBoxLabs Жыл бұрын
You're very welcome Steffen. Glad it was helpful!
@louisroyce15
@louisroyce15 Жыл бұрын
Thanks for the example scripts they are very helpful. I've noticed a slight error on the new branch script. When creating the AP's and Servers, the log message is outputting the name of the routers. this is due to self.log_success(f"Created new AP: {router}") on lines 94 and 107. This should be: self.log_success(f"Created new AP: {ap}") and self.log_success(f"Created new server: {server}")
@NetBoxLabs
@NetBoxLabs Жыл бұрын
Hey Louis! Glad you found the example scripts useful. Also, great spot on that error!! we will get this fixed up in the code and pushed to the repo ASAP.
@kazulka710
@kazulka710 6 ай бұрын
How I can see a decrypt secret in my custom script? My session has a session key, but secret.plaintext is None. I am try use secret.decrypt method with arg cookie but take error.
NetBox Zero To Hero - Video 12 - Reports
4:18
NetBox Labs
Рет қаралды 6 М.
If you're not developing with this, you're wasting your time
14:30
Articulated Robotics
Рет қаралды 281 М.
OMG what happened??😳 filaretiki family✨ #social
01:00
Filaretiki
Рет қаралды 12 МЛН
Meet the one boy from the Ronaldo edit in India
00:30
Younes Zarou
Рет қаралды 14 МЛН
SCHOOLBOY. Последняя часть🤓
00:15
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 12 МЛН
How This New Battery is Changing the Game
12:07
Undecided with Matt Ferrell
Рет қаралды 42 М.
3 PYTHON AUTOMATION PROJECTS FOR BEGINNERS
17:00
Internet Made Coder
Рет қаралды 1,6 МЛН
The BEST Tool to Deploy Your Apps (Stop using Vercel)
10:07
FASTEST Way To Learn Coding and ACTUALLY Get A Job
10:44
Brian Cache
Рет қаралды 1 МЛН
Stop using Zapier, Make, n8n
25:33
Adam Skjervold
Рет қаралды 7 М.
Automating My Life with Python: The Ultimate Guide | Code With Me
11:26
OMG what happened??😳 filaretiki family✨ #social
01:00
Filaretiki
Рет қаралды 12 МЛН