That was super helpful. when i went through Knox's course, I had no idea where he had gotten the xml when he was demoing netconf. but then he move on to restconf and that was much friendlier to learn. still, nothing beats a REST API and json key value pairs for simplicity. Thanks so much.
Add a new configuration through the CLI then pull and review the configuration change in the NETCONF XML data structure. This is a great video and a practical tip for anyone looking to begin working with new data structures. Start simple and work your way up.
Thanks for making this video. I have been struggling with learning how to use yang models. I always get stuck when I try to figure out (1) which model to use (2) how to get the model and edit it.
Thanks, Stephen! Really glad to hear you find them useful :) I've finished all my sections for DEVCOR - in fact i'd probably say it's 95% completed now. So at a guess, I'd say maybe a few weeks until its release? Not long anyway! haha Thanks again man for the kind words, I really appreciate it -John
@@spaynter Love it! Well the course should definitely be dropping very soon. We all worked extra hard on this one so hopefully you like it. And as always, if you're going through any of my content - DEVCOR or otherwise -and have any questions feel free to message me anytime. Best place to get me is on Twitter :)
Hey Jnyanesh! IOSXR is supported but the workflow is slightly different. Which is frustrating - I wish the different platforms behaved the same but there's a few changes required to get XR to work. For example you don't put the "operation="replace"" at the feature level in the payload, etc. I will likely make an XR specific video in the future to address these differences :) -John
@@IPvZero Hi John, Thank you so much for replying. Can't wait to see IOS-XR video. I am trying simple netconf-get as well but something is missing. Capability is working fine but not the running-config. from nornir import InitNornir from nornir_utils.plugins.functions import print_result from nornir_scrapli.tasks import netconf_get_config, netconf_capabilities from xml.dom import minidom import xml.dom.minidom nr = InitNornir(config_file="config.yaml") interface_filter = """
The output is just below, which is clear when using ncclient jnyanesh@colt123:~/NETCONF_TRY$ /usr/bin/python3 /home/jnyanesh/NETCONF_TRY/Nornir_NETCONF_02.py netconf_test******************************************************************** * rtr1 ** changed : False ****************************************************** vvvv netconf_test ** changed : False vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv INFO ---- netconf_get_config ** changed : False ------------------------------------- INFO
@@jnyaneshbl Hey, man. Just looking at your filter it looks like you've manually added the tag. Scrapli_netconf will apply this for you. Try this as an example script: ***************************************************** from nornir_scrapli.tasks import netconf_get_config from nornir_utils.plugins.functions import print_result from nornir import InitNornir nr = InitNornir(config_file="config.yaml") filterstuff = """ GigabitEthernet0/0/0/6
""" def get_yang(task): task.run(task=netconf_get_config, source= "running", filter_type="subtree", filters=filterstuff) result = nr.run(task=get_yang) print_result(result) ********************************************************** Hopefully that helps :) -John
Learn more here: learn.gg/adv-net
That was super helpful. when i went through Knox's course, I had no idea where he had gotten the xml when he was demoing netconf. but then he move on to restconf and that was much friendlier to learn. still, nothing beats a REST API and json key value pairs for simplicity. Thanks so much.
Add a new configuration through the CLI then pull and review the configuration change in the NETCONF XML data structure. This is a great video and a practical tip for anyone looking to begin working with new data structures. Start simple and work your way up.
Thank you, James! Really good to hear your feedback :)
Wonderful explanation in simplest way. Thank you
Thanks so much, KOTI LAK! I really appreciate it :)
-John
Thanks for making this video. I have been struggling with learning how to use yang models. I always get stuck when I try to figure out (1) which model to use (2) how to get the model and edit it.
Great video! Looking for a way to just translate the CLI config without hunting, is it possible yet?
Another amazing video! Thank you for sharing your knowledge and experience :D
Thanks, Kamil!!
Keep them coming, super insightful. Whens the DEVCOR planning on dropping at CBT?
Thanks, Stephen! Really glad to hear you find them useful :)
I've finished all my sections for DEVCOR - in fact i'd probably say it's 95% completed now. So at a guess, I'd say maybe a few weeks until its release? Not long anyway! haha
Thanks again man for the kind words, I really appreciate it
-John
@@IPvZero Thats gonna be training to start my devnet professional now i have my associate
@@spaynter Love it! Well the course should definitely be dropping very soon. We all worked extra hard on this one so hopefully you like it. And as always, if you're going through any of my content - DEVCOR or otherwise -and have any questions feel free to message me anytime. Best place to get me is on Twitter :)
Good video mate keep em coming for us.
Thanks, George! I will do! And thanks for leaving your feedback, I genuinely appreciate it :)
-John
Looks very easy thanks. The examples showed are not working on IOS-XR. Is it supported?
Hey Jnyanesh! IOSXR is supported but the workflow is slightly different. Which is frustrating - I wish the different platforms behaved the same but there's a few changes required to get XR to work. For example you don't put the "operation="replace"" at the feature level in the payload, etc. I will likely make an XR specific video in the future to address these differences :)
-John
@@IPvZero Hi John, Thank you so much for replying. Can't wait to see IOS-XR video. I am trying simple netconf-get as well but something is missing. Capability is working fine but not the running-config.
from nornir import InitNornir
from nornir_utils.plugins.functions import print_result
from nornir_scrapli.tasks import netconf_get_config, netconf_capabilities
from xml.dom import minidom
import xml.dom.minidom
nr = InitNornir(config_file="config.yaml")
interface_filter = """
GigabitEthernet0/0/0/19
"""
def netconf_test(task):
output = task.run(task=netconf_get_config, source="running", filters=interface_filter, filter_type="subtree")
result = output[0].result
print(result)
# def netconf_capability(task):
# output = task.run(task=netconf_capabilities)
# print(output)
# print(type(output))
result = nr.run(task=netconf_test)
print_result(result)
# capability = nr.run(task=netconf_capability)
# print_result(capability)
The output is just below, which is clear when using ncclient
jnyanesh@colt123:~/NETCONF_TRY$ /usr/bin/python3 /home/jnyanesh/NETCONF_TRY/Nornir_NETCONF_02.py
netconf_test********************************************************************
* rtr1 ** changed : False ******************************************************
vvvv netconf_test ** changed : False vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv INFO
---- netconf_get_config ** changed : False ------------------------------------- INFO
@@jnyaneshbl Hey, man. Just looking at your filter it looks like you've manually added the tag. Scrapli_netconf will apply this for you. Try this as an example script:
*****************************************************
from nornir_scrapli.tasks import netconf_get_config
from nornir_utils.plugins.functions import print_result
from nornir import InitNornir
nr = InitNornir(config_file="config.yaml")
filterstuff = """
GigabitEthernet0/0/0/6
"""
def get_yang(task):
task.run(task=netconf_get_config, source= "running", filter_type="subtree", filters=filterstuff)
result = nr.run(task=get_yang)
print_result(result)
**********************************************************
Hopefully that helps :)
-John
@@IPvZero Hi John, Perfect, it is working now. Thank you so much.
Awesome video buddy!
Thanks, Stuart!!