{"id":837,"date":"2024-08-30T13:08:01","date_gmt":"2024-08-30T12:08:01","guid":{"rendered":"http:\/\/jaychou.co.uk\/?page_id=837"},"modified":"2024-10-09T09:54:48","modified_gmt":"2024-10-09T08:54:48","slug":"network-automation","status":"publish","type":"page","link":"https:\/\/jaychou.co.uk\/?page_id=837","title":{"rendered":"Network Automation"},"content":{"rendered":"\n<p class=\"has-large-font-size\"><strong>Section 1: Python Fundamentals<\/strong><\/p>\n\n\n\n<p><a href=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=2\">Understanding Data Types<\/a><\/p>\n\n\n\n<p><a href=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=3\">Learning to Use Strings<\/a><\/p>\n\n\n\n<p><a href=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=4\" data-type=\"link\" data-id=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=4\">Learning to Use Numbers<\/a><\/p>\n\n\n\n<p><a href=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=5\">Using if, elif &amp; else Statements<\/a><\/p>\n\n\n\n<p><a href=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=6\" data-type=\"link\" data-id=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=6\">Learning to Use Booleans<\/a><\/p>\n\n\n\n<p><a href=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=7\" data-type=\"link\" data-id=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=7\">Learning to use While and For Loops<\/a><\/p>\n\n\n\n<p><a href=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=8\" data-type=\"link\" data-id=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=8\">Learning to Use Lists<\/a><\/p>\n\n\n\n<p><a href=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=9\">Learning to Use Dictionaries<\/a><\/p>\n\n\n\n<p><a href=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=10\" data-type=\"link\" data-id=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=10\">NETMIKO: Hands On Lab I &#8211; <strong>&#8220;<\/strong>Accessing a Router and Executing Commands<strong>&#8220;<\/strong><\/a><\/p>\n\n\n\n<p><a href=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=11\" data-type=\"link\" data-id=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=11\">NETMIKO: Hands on Lab II &#8211; Using a For Loop to do the same thing!<\/a><\/p>\n\n\n\n<p><a href=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=12\" data-type=\"link\" data-id=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=12\">NETMIKO: Hands on Lab III<\/a><\/p>\n\n\n\n<p><a href=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=13\" data-type=\"link\" data-id=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=13\">Learning to Use Sets and Tuples<\/a><\/p>\n\n\n\n<p><a href=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=14\" data-type=\"link\" data-id=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=14\">Understanding the Principle of Containment<\/a><\/p>\n\n\n\n<p><a href=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=15\" data-type=\"link\" data-id=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=15\">Learning to Use\/Create Python Functions<\/a><\/p>\n\n\n\n<p><s><a href=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=15\" data-type=\"link\" data-id=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=15\">Creating 5 functions that leverage the IPaddress Package<\/a> &#8211;<\/s> TBC<\/p>\n\n\n\n<p class=\"has-large-font-size\"><strong>Section 2: Python Tools<\/strong><\/p>\n\n\n\n<p><a href=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=17\" data-type=\"link\" data-id=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=16\">Using f-strings<\/a><\/p>\n\n\n\n<p><a href=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=17\" data-type=\"link\" data-id=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=17\">Using the <\/a><a href=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=18\" data-type=\"link\" data-id=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=17\">IPAddress <\/a><a href=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=17\" data-type=\"link\" data-id=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=17\">Library (with Lab)<\/a><\/p>\n\n\n\n<p><a href=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=19\" data-type=\"link\" data-id=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=18\">Using Input and Getpass to protect Passwords<\/a><\/p>\n\n\n\n<p><a href=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=19\" data-type=\"link\" data-id=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=19\">Using sys.argv and Netmiko to Execute Show Commands on a Cisco IOS XE Device<\/a><\/p>\n\n\n\n<p><a href=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=20\" data-type=\"link\" data-id=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=20\">Using NETCONF with Cisco IOS XE Devices for Network Automation<\/a><\/p>\n\n\n\n<p><a href=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=21\" data-type=\"link\" data-id=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=21\">Using RESTCONF with Cisco IOS XE Devices for Network Automation<\/a><\/p>\n\n\n\n<p class=\"has-large-font-size\">Section 3: API Fundamentals<\/p>\n\n\n\n<p><a href=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=22\" data-type=\"link\" data-id=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=22\">API Automation vs. Conventional CLI Interaction in Cisco Network Resources<\/a><\/p>\n\n\n\n<p><a href=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=23\">API Automation vs. NETCONF and RESTCONF in Network Management<\/a><\/p>\n\n\n\n<p><\/p>\n\n\n\n<!--nextpage-->\n\n\n\n<p class=\"has-large-font-size\">Data Types<\/p>\n\n\n\n<p><strong>Integer <\/strong>&#8211; Used for whole numbers only, so without any decimals in between.<br>VLAN = 10<\/p>\n\n\n\n<p><strong>Float <\/strong>&#8211; Used with numbers AND decimal points.<br>Bandwidth_in_Mb = 10.1<\/p>\n\n\n\n<p><strong>String <\/strong>&#8211; Can use characters AND numbers together.<br>Router_Name = EMEAManchester<\/p>\n\n\n\n<p><strong>List <\/strong>&#8211; You can store multiple items in a list, the list of &#8216;items&#8217; can be changed, added or removed.<br>Router_Type = [&#8220;ISR4k&#8221;, &#8220;Cat8000&#8221;, &#8220;ASR1k&#8221;]<\/p>\n\n\n\n<p><strong>Dictonary <\/strong>&#8211; Data stored in pairs, each pair will represent a key and a value.<br>Router_Details = {&#8220;router_name&#8221;: &#8220;CAT8kv&#8221;, &#8220;router_IP&#8221;, &#8220;192.168.1.1&#8221;}<\/p>\n\n\n\n<p><strong>Tuple <\/strong>&#8211; Similar to a list but the variables in the Tuple cannot be changed or modified.<br>Serial_Number = (FK123456789)<\/p>\n\n\n\n<p><strong>Boolean <\/strong>&#8211; It is either True or False, so within your Python script if the port interface is down then this represents false with the next action.<br>Interface_Down = False<br>Interface_Up = True<\/p>\n\n\n\n<p><strong>Set <\/strong>&#8211; Whatever is in the Set has to be unique and cannot be the same, for example a list of Serial Numbers which you know cannot be the same.<br>Serial_Number = {&#8220;FK123456789&#8221;, &#8220;SN123457789&#8221;}<\/p>\n\n\n<ul class=\"wp-block-page-list\"><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=591\">Cisco Catalyst SD-WAN<\/a><\/li><li class=\"wp-block-pages-list__item menu-item-home\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/\">Jonny Hoang<\/a><\/li><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=837\">Network Automation<\/a><\/li><\/ul>\n\n\n<!--nextpage-->\n\n\n\n<p class=\"has-x-large-font-size\">Learning to Use Strings<\/p>\n\n\n\n<p class=\"has-large-font-size\"><strong>Section 1: Creating and Accessing Strings<\/strong><\/p>\n\n\n\n<p>To access into Python type:<\/p>\n\n\n\n<p>python3  #current version is 3.<\/p>\n\n\n\n<p>To exit into Python type:<\/p>\n\n\n\n<p><em>exit() <\/em><\/p>\n\n\n\n<p>or<\/p>\n\n\n\n<p><em>ctrl + D<\/em> #Linux\/MAC or <em>ctrl z<\/em> #Windows<\/p>\n\n\n\n<p>Creating a String:<\/p>\n\n\n\n<p><img decoding=\"async\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAARUAAABHCAYAAAAp39OqAAAW5klEQVR4Xu2dd1yUx\/aHn3dZii2oiKLYvcYbjbEmsRGxYr0UO4iIWK4dS5QgKIloNDGoiIqCBTUoEhtirxgL4WrUGJVoImqsPyt2EbO\/l2VXpe9+siIbZv8Th3fOPHPm+545M3uQ6hf9lwrxEQQEAUHAQAQkISoGIikeIwgIAmoCQlSEIwgCgoBBCQhRMShO8TBBQBAQoiJ8QBAQBAxKQIiKQXGKhwkCgoAQFeEDgoAgYFACQlQMilM8TBAQBIxKVBRFSlJcSubBE3G1RriuIFBQCRiNqEglnZh93o+H\/Zrhvy3l7fG0qMegLYtwt9rN5Lb+7L8tBOztwTbck01bT2VLmMSUD\/z4X5MpbF5ZhMCaPhx6i65iOOvf\/ZMMyc94RKWUC8G\/+3K\/79sVFamMC7NPz+Az87MsbOZC2JmX737GhQV5ElDaTSYmXEFA3QB+bjyJDREWBNbx5yetqCjrMGDbYjwbWFHUQkL17BG3k34lIWoZi0L2c\/VZnl38vQaSJR97+9DhYQTTwxPJX69SYtvjaxbMf59Y++x9Ok9+eoxeiEoWWCZYNW5D4xLnOLDvIk\/1g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SK4ro6mRKRSmJ1cjD1\/Cei+\/ZHTpjYei1jjd58vP53AvrvpK1kq25v5ib6kDM8aqbSNOMg0m9k4dVwhL25TmsyLY+6\/w3BxWMZV7TYpS6JWKyq2uG7fgceZQXTxPsKbcqXu16Y3C0+P5cHYfiw4kinJnNbg6R2u\/JmcnosRopK\/XiV6K9QE9BAVmZPZBwzZH4XDfk9cfY+h3gGZVKPfrs0MlHMqvZzXpEcG8kdR3olZCdMoH+KM28xzcmSjoOLISNZNvIn\/h97s1Bz\/ZD390c7He3SOOsgklR8OvWN4mHma1LmcGNwvT6DPgO2535kRolKonVwMPn8J6Ccq8kmPpXMQ60OtCWvSjzVJaQoin\/60kE9\/Nrih3DqfxStOcL9UXbp8PoJ2pusY3TqQeK2AVO5F8JEp1IgPJXjBIa48kihe05nx81pxvJv2SFkLwIQqo1ez1r8Eu6YEsen4PaQy1bC+s4eth9KOlOV+m49nyfq+WMStInJNPL9fk4+RzS2xqQ5nV+7j4qsTb123P0pK2FagpHyD2KTuQEKWNmZ\/72FE\/fEyw6lT\/k6R6E0QMC4CeoqKPDjzeoyKX41D3EB6eB\/miXq8JpRu5sZwv77YN067p3JVvqeymsVfreToq3sq6viFUs09GR\/ojl09G4opXvD49g2uJB5j7fhJbEzMdB2+SA06Tw9gkEs9KpY25fmNRPZM8SYg8pImp6PAslF3Bvv0oVWzmpQrYcLz5Jtc\/nkDQe7BJGiPinWNVNTtYhnRQJlpFjPfjzGuSRbWCgL5SUB8Szk\/aYu+BIFCQECISiGYZDFEQSA\/CQhRyU\/aoi9BoBAQEKJSCCZZDFEQyE8CQlTyk7boSxAoBAT+H+3huwN9jtKBAAAAAElFTkSuQmCC\" alt=\"\"><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>1.2 Accessing Characters in a String<\/strong><\/p>\n\n\n\n<p>You can access a specific character of the string, this always begin at 0 as the first character:<\/p>\n\n\n\n<p><em>device_name[0]<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/08\/image.png\"><img loading=\"lazy\" decoding=\"async\" width=\"193\" height=\"297\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/08\/image.png\" alt=\"\" class=\"wp-image-846\" style=\"aspect-ratio:0.6498316498316499;width:193px;height:auto\"\/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>1.3 Slicing Strings<\/strong><\/p>\n\n\n\n<p>This is useful if you want to only take a section of the characters such as the first 6 characters of the String:<\/p>\n\n\n\n<p>The example below is a String that is sliced, so I have created a String called &#8216;device_name&#8217; which contains &#8216;Router1&#8217;. I then only want to print the characters of &#8216;Router&#8217; without &#8216;1&#8217;. Remember string characters start from 0 which means it is &#8216;R&#8217; in the example below.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/08\/image-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"302\" height=\"82\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/08\/image-1.png\" alt=\"\" class=\"wp-image-847\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/08\/image-1.png 302w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/08\/image-1-300x81.png 300w\" sizes=\"(max-width: 302px) 100vw, 302px\" \/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p class=\"has-large-font-size\"><strong>Section 2: String Concatenation and Repetition<\/strong><\/p>\n\n\n\n<p>You can create multiple Strings then add them together.<\/p>\n\n\n\n<p>Example below illustrates how you can add two or more strings together, everytime you add a string make sure you add the <em>+<\/em> then the string.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/08\/image-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"990\" height=\"127\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/08\/image-2.png\" alt=\"\" class=\"wp-image-848\" style=\"aspect-ratio:7.7952755905511815;width:739px;height:auto\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/08\/image-2.png 990w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/08\/image-2-300x38.png 300w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/08\/image-2-768x99.png 768w\" sizes=\"(max-width: 990px) 100vw, 990px\" \/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>2.2 Repeating Strings<\/strong><\/p>\n\n\n\n<p>In the example below, I have concatenated two strings together and repeated the string &#8220;no shutdown&#8221; 3 times.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/08\/image-3.png\"><img loading=\"lazy\" decoding=\"async\" width=\"966\" height=\"238\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/08\/image-3.png\" alt=\"\" class=\"wp-image-849\" style=\"aspect-ratio:4.0588235294117645;width:738px;height:auto\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/08\/image-3.png 966w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/08\/image-3-300x74.png 300w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/08\/image-3-768x189.png 768w\" sizes=\"(max-width: 966px) 100vw, 966px\" \/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p class=\"has-large-font-size\"><strong>Section 3: Common Built-In String Methods<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>3.1 Converting Case: <code>lower()<\/code> and <code>upper()<\/code><\/strong><\/p>\n\n\n\n<p>This example below illustrates in how to change the String variable from Upper case to lower case and vice versa using the <em>lower() and upper() <\/em>syntax.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image.png\"><img loading=\"lazy\" decoding=\"async\" width=\"394\" height=\"174\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image.png\" alt=\"\" class=\"wp-image-856\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image.png 394w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-300x132.png 300w\" sizes=\"(max-width: 394px) 100vw, 394px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>3.2 Finding Substrings: <code>find()<\/code><\/strong><\/p>\n\n\n\n<p>You can find the specific String and see where it is positioned within the index. And by that using the example below &#8216;WAN&#8217; is at the index 16 as remember index starts from 0 so &#8216;I&#8217; is index 0. If you see a result of -1 this means that the string I tried to search for doesn&#8217;t exist.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"357\" height=\"135\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-1.png\" alt=\"\" class=\"wp-image-857\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-1.png 357w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-1-300x113.png 300w\" sizes=\"(max-width: 357px) 100vw, 357px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>3.3 Replacing Substrings: <code>replace()<\/code><\/strong><\/p>\n\n\n\n<p>You can replace a specific String to something else. Example below I changed the string from &#8216;network&#8217; to &#8216;Python&#8217;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"620\" height=\"92\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-2.png\" alt=\"\" class=\"wp-image-858\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-2.png 620w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-2-300x45.png 300w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>3.4 Splitting and Joining Strings: <code>split()<\/code> and <code>join()<\/code><\/strong><\/p>\n\n\n\n<p>You can split the Strings up into every work per space.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-3.png\"><img loading=\"lazy\" decoding=\"async\" width=\"704\" height=\"110\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-3.png\" alt=\"\" class=\"wp-image-859\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-3.png 704w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-3-300x47.png 300w\" sizes=\"(max-width: 704px) 100vw, 704px\" \/><\/a><\/figure>\n\n\n\n<p>You can also join the words back. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-4.png\"><img loading=\"lazy\" decoding=\"async\" width=\"725\" height=\"85\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-4.png\" alt=\"\" class=\"wp-image-860\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-4.png 725w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-4-300x35.png 300w\" sizes=\"(max-width: 725px) 100vw, 725px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>3.5 Removing Whitespace: <code>strip()<\/code>, <code>lstrip()<\/code>, <code>rstrip()<\/code><\/strong><\/p>\n\n\n\n<p>You can remove empty space in the String such as leading and ending spaces of a String.<\/p>\n\n\n\n<p>strip() = removes the leading and ending spaces together.<\/p>\n\n\n\n<p>lstrip() = removes the leading space onlu<\/p>\n\n\n\n<p>rstrip() = removes the ending space only.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-5.png\"><img loading=\"lazy\" decoding=\"async\" width=\"494\" height=\"154\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-5.png\" alt=\"\" class=\"wp-image-861\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-5.png 494w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-5-300x94.png 300w\" sizes=\"(max-width: 494px) 100vw, 494px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><div class=\"fix-z-index-when-showing-intro-js region-animation-complete\" id=\"flyout-region\"><div id=\"flyout-layout\" class=\"detail-flyout-layout\" data-tab=\"post-detail\" data-subtab=\"\"><div class=\"flyout-left scrollable-area\" id=\"flyout-main-content\"><div id=\"flyout-content-region\"><div><div class=\"post-detail-region\"><div id=\"post-detail-layout\"><div class=\"content-region\"><div id=\"detail-layout\" class=\"is-showing-coursework has-more-posts\"><div class=\"detail-layout-content-wrapper\"><div class=\"detail-layout-description mighty-wysiwyg-content mighty-max-content-width fr-view\"><p><strong>3.6 Checking String Content: <code>startswith()<\/code> and <code>endswith()<\/code><\/strong><\/p><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/p>\n\n\n\n<p>You can check if the specific String starts with or ends with whatever you search for in that String. The example below shows if the String begins with &#8216;show&#8217; it will return the Boolean logic of true or false.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-6.png\"><img loading=\"lazy\" decoding=\"async\" width=\"343\" height=\"173\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-6.png\" alt=\"\" class=\"wp-image-862\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-6.png 343w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-6-300x151.png 300w\" sizes=\"(max-width: 343px) 100vw, 343px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-large-font-size\"><strong>Section 4: Advanced String Operations<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><div class=\"fix-z-index-when-showing-intro-js region-animation-complete\" id=\"flyout-region\"><div id=\"flyout-layout\" class=\"detail-flyout-layout\" data-tab=\"post-detail\" data-subtab=\"\"><div class=\"flyout-left scrollable-area\" id=\"flyout-main-content\"><div id=\"flyout-content-region\"><div><div class=\"post-detail-region\"><div id=\"post-detail-layout\"><div class=\"content-region\"><div id=\"detail-layout\" class=\"is-showing-coursework has-more-posts\"><div class=\"detail-layout-content-wrapper\"><div class=\"detail-layout-description mighty-wysiwyg-content mighty-max-content-width fr-view\"><p><strong>4.1 String Formatting<\/strong><\/p><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/p>\n\n\n\n<p>Using the keyword &#8216;f&#8217; means it will format the String, so in networking you could add two Strings together by calling the indiviual String. In this example I created 2 Strings &#8216;ip&#8217; and description&#8217;, i then formatted the two Strings together with a third String.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-7.png\"><img loading=\"lazy\" decoding=\"async\" width=\"727\" height=\"154\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-7.png\" alt=\"\" class=\"wp-image-864\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-7.png 727w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-7-300x64.png 300w\" sizes=\"(max-width: 727px) 100vw, 727px\" \/><\/a><\/figure>\n\n\n\n<p>Another way to format the string is to use an alternative method. In the &#8216;formatstring&#8217; String, the {} is calling for the string to format &#8216;.format()&#8217; at the end of the command which is &#8216;ip&#8217; and &#8216;description&#8217;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-8.png\"><img loading=\"lazy\" decoding=\"async\" width=\"724\" height=\"159\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-8.png\" alt=\"\" class=\"wp-image-865\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-8.png 724w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-8-300x66.png 300w\" sizes=\"(max-width: 724px) 100vw, 724px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>4.2 Checking for Substrings with <code>in<\/code> and <code>not in<\/code><\/strong><\/p>\n\n\n\n<p>You can check if a certain keyword is within the String. So if you wanted to check if the IP address is within the String you can use the Substring.<\/p>\n\n\n\n<p class=\"has-text-align-left\"><img decoding=\"async\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgMAAABwCAYAAACD8nMRAAAgAElEQVR4Xu2de0DN9\/\/HH+ecbuaSe5G7xcYMK5vLstyz8aNci1gaRggzWq77um8WuZUUw0QsLGy2uW4uaTNjazLb0BjmMjGMot+nm9WR+px2Trq8Pn\/W67wvj9fr834\/P++rpslTTycjjxAQAkJACAgBIVBsCWhEDBRb30vFhYAQEAJCQAikEhAxIIEgBISAEBACQqCYExAxUMwDoFBVX2uJdQVLbl++QWKhKrgUtigT0JYoSylNAjdu5zzjqtauKLOSuhVcAiIGCqpvrBozePsyPCvsZEr7yey9UjiXdpi3nc725RqmPjuJb5pPZeuaEsyw9+PAPUPBm9Fkzhcsa76O3u2Wc\/a+ob8Xe4MJmDVm9JF1tN3ugZv\/9yQZnEDR\/4GmbHfmn5rEzQEtmfzZ44N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UgkhIASEgBAQAkYjYJAY6KGIgbG3JtBJGZZ\/uFYwBzGgtR\/K6ugexHTszMIjaV\/6uT3aqv0I\/nECN4a8xLiPlYUEypoBzy+i8Iwfj\/ugHVzV37KQW4LyfyEgBISAEBACQiBHAurFAFrsvEMJn1uN6BnziNj9G3\/dM6Nkrf9jwjpP\/vB6dGQAq1ZM\/DGUl7\/9gDlLjnOvQk0qXt3L9q8vKwv+tNj0fJuhz57l6z0\/EK+sPXjwVGWe7T2a8cNKEdGmO0HHUgSEsq2w1TjCNvXHat9HhK+P5pc\/lO2EltbY1oETa\/ZwRv3xiBIOQkAICAEhIASEgB4BA8RASr9clkaDxzLsDWca1KxIKYskbidc5+rvp9g6bigrDuv3yloqdx7Hu7N78UJNS26fP8Wh999m0qrfFDGgw677eN4e047nnqlCuad03L99jfPHD\/NF4HzCtsXz76SAFmuHngzxc6dNS3tsSuu4m3CJ+O82E+C5kJiHcxbiXyEgBISAEBACQsBQAsa\/qMjQEoi9EBACQkAICAEh8EQJiBh4ovglcyEgBISAEBACT56AiIEn7wMpgRAQAkJACAiBJ0pAxMATxS+ZCwEhIASEgBB48gREDDx5H0gJhIAQEAJCQAg8UQIFXgwcvXVKFaCmJe1V2YmREBACQkAICAEhkJWAiAGJCCEgBISAEBACxZzA\/wMIaLXyCx3fkgAAAABJRU5ErkJggg==\" alt=\"\"><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>4.3 Escaping Special Characters<\/strong><\/p>\n\n\n\n<p>Using special characters that allows you to quote within a string use the \\ button.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-9.png\"><img loading=\"lazy\" decoding=\"async\" width=\"465\" height=\"67\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-9.png\" alt=\"\" class=\"wp-image-867\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-9.png 465w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-9-300x43.png 300w\" sizes=\"(max-width: 465px) 100vw, 465px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-large-font-size\"><strong>Section 5: Practical Exercises<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><div class=\"fix-z-index-when-showing-intro-js region-animation-complete\" id=\"flyout-region\"><div id=\"flyout-layout\" class=\"detail-flyout-layout\" data-tab=\"post-detail\" data-subtab=\"\"><div class=\"flyout-left scrollable-area\" id=\"flyout-main-content\"><div id=\"flyout-content-region\"><div><div class=\"post-detail-region\"><div id=\"post-detail-layout\"><div class=\"content-region\"><div id=\"detail-layout\" class=\"is-showing-coursework has-more-posts\"><div class=\"detail-layout-content-wrapper\"><div class=\"detail-layout-description mighty-wysiwyg-content mighty-max-content-width fr-view\"><p><strong>5.1 Exercise 1: Extracting Interface Names<\/strong><\/p><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/p>\n\n\n\n<p>Write a Python snippet to extract the IP addresses.<\/p>\n\n\n\n<p>The solution below is essentially creating three lines illustrating the IP addresses, then splitting the line but when splitting use the index 0 which belongs to &#8216;x.x.x.x&#8217; IP. In my example we have three lines and each line has 3 interfaces:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-11.png\"><img loading=\"lazy\" decoding=\"async\" width=\"304\" height=\"66\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-11.png\" alt=\"\" class=\"wp-image-870\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-11.png 304w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-11-300x65.png 300w\" sizes=\"(max-width: 304px) 100vw, 304px\" \/><\/a><\/figure>\n\n\n\n<p>1.1.1.1<\/p>\n\n\n\n<p>2.2.2.2<\/p>\n\n\n\n<p>3.3.3.3<\/p>\n\n\n\n<p>I then write the script so that it splits the lines but when splitting the lines up I want to only record the IP address and it is in index 0. Hence the script has 0, it will then call the String &#8216;IP&#8217; and display into different lines(split).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-12.png\"><img loading=\"lazy\" decoding=\"async\" width=\"618\" height=\"23\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-12.png\" alt=\"\" class=\"wp-image-871\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-12.png 618w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-12-300x11.png 300w\" sizes=\"(max-width: 618px) 100vw, 618px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-14.png\"><img loading=\"lazy\" decoding=\"async\" width=\"594\" height=\"124\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-14.png\" alt=\"\" class=\"wp-image-873\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-14.png 594w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-14-300x63.png 300w\" sizes=\"(max-width: 594px) 100vw, 594px\" \/><\/a><\/figure>\n\n\n\n<p>If I wanted to split the lines but record the status of interfaces whether the interface is up or down i could use this example below. Notice the index is set to 2 which means it is the last &#8216;word&#8217; I am looking for. As the first &#8216;word&#8217; is index 0.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-13.png\"><img loading=\"lazy\" decoding=\"async\" width=\"689\" height=\"143\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-13.png\" alt=\"\" class=\"wp-image-872\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-13.png 689w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-13-300x62.png 300w\" sizes=\"(max-width: 689px) 100vw, 689px\" \/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>5.2 Exercise 2: Generating Configurations<\/strong><\/p>\n\n\n\n<p>Write a Python snippet to generate interface configurations for multiple interfaces using a loop.<\/p>\n\n\n\n<p>I create the list of interfaces first (remember list starts with square brackets and ends in square brackets [].<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-15.png\"><img loading=\"lazy\" decoding=\"async\" width=\"485\" height=\"25\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-15.png\" alt=\"\" class=\"wp-image-875\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-15.png 485w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-15-300x15.png 300w\" sizes=\"(max-width: 485px) 100vw, 485px\" \/><\/a><\/figure>\n\n\n\n<p>I then create a loop which calles the List &#8216;interfaces&#8217;, the loop is called &#8216;THEINTERFACE&#8217;. When the loop is called two new lines is being added with the String for the description and not to shutdown the port. Lastly the loop asks the script to print out the config.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-16.png\"><img loading=\"lazy\" decoding=\"async\" width=\"727\" height=\"83\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-16.png\" alt=\"\" class=\"wp-image-876\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-16.png 727w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-16-300x34.png 300w\" sizes=\"(max-width: 727px) 100vw, 727px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-17.png\"><img loading=\"lazy\" decoding=\"async\" width=\"726\" height=\"363\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-17.png\" alt=\"\" class=\"wp-image-877\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-17.png 726w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-17-300x150.png 300w\" sizes=\"(max-width: 726px) 100vw, 726px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>5.3 Exercise 3: Parsing Command Output<\/strong><\/p>\n\n\n\n<p>Write a Python snippet to parse the output of the <code>show ip interface brief<\/code> command and extract interfaces with the status &#8220;up&#8221;.<\/p>\n\n\n\n<p>First off i create the List and called it &#8216;<em>showipint&#8217;<\/em>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-18.png\"><img loading=\"lazy\" decoding=\"async\" width=\"727\" height=\"227\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-18.png\" alt=\"\" class=\"wp-image-878\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-18.png 727w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-18-300x94.png 300w\" sizes=\"(max-width: 727px) 100vw, 727px\" \/><\/a><\/figure>\n\n\n\n<p>I then split the lines but this time I split the lines that begin with my interface (GigabitEthernet0\/X) and IF it includes &#8216;up&#8217; within the same LINE display it.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-19.png\"><img loading=\"lazy\" decoding=\"async\" width=\"717\" height=\"89\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-19.png\" alt=\"\" class=\"wp-image-879\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-19.png 717w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-19-300x37.png 300w\" sizes=\"(max-width: 717px) 100vw, 717px\" \/><\/a><\/figure>\n\n\n\n<p>Alternatively, you could do the same for if the Status is Administratively down then display the interface.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-18.png\"><img loading=\"lazy\" decoding=\"async\" width=\"727\" height=\"227\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-18.png\" alt=\"\" class=\"wp-image-878\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-18.png 727w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-18-300x94.png 300w\" sizes=\"(max-width: 727px) 100vw, 727px\" \/><\/a><\/figure>\n\n\n\n<p><img decoding=\"async\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAtIAAABWCAYAAADi1HFNAAAgAElEQVR4Xu2dd0AURxuHnysUewEr9kSNLUbRWFHsJRZERUGxIfYAdkTsih0sKIgldkVjA3usiZVPo8ag2HuLsaBGI2j89g5Q+u3BIaJzf8Lszswz7zvz29l331F8l\/nrd2TQnyKXLXMue\/C0c01G7YjIML1QmNviEzqFOibn8atpy8Jzb1PXdkUOqrq50\/T5MrwWhZHKu6WuLYlcrR2nS4N52KUlPoffSCXeEfnyOf9GxhQ2IVexguQwVqCu4MTsgBKstuzEquv\/JdoWg\/MzeI8NdcM04qKXvSjJazuNnxZbcXuiM4O9\/+BFvBlDaV4Tty3zsc\/1C+4NhrP3XhLjptMOorgZF29E72kutKpTnCwvb3Jq7XymT9jK9ZdxuaozZ8PUSIECFeVGbWBWhaXYNFvO\/cSrlzEoSvJ3XcBan684MWkaa\/ff5JWpGRbl8\/Fo4wZO\/p1eU2Ua2YEMImlR5NP1XzWVpu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TjQYBf+kYGNLwM0XfhHBhgk0cR0IWAsnT1xguntM0lCOuoXeWgC3wshnS6jkV6VxhHS6dUIUa8gIAgIAoKAICAICAKCgCCQ0QgIIZ3RRky0VxAQBAQBQUAQEAQEAUHgkyCQIYT0qX8uyYJVKUtJWeVEIUFAEBAEBAFBQBAQBAQBQSC1BISQTi1Bcb0gIAgIAoKAICAICAKCwBdJQAjp\/\/UeewAAABtJREFUL3LYRacFAUFAEBAEBAFBQBAQBFJL4P+10jwKFV9efwAAAABJRU5ErkJggg==\" alt=\"\"><\/p>\n\n\n<ul class=\"wp-block-page-list\"><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=591\">Cisco Catalyst SD-WAN<\/a><\/li><li class=\"wp-block-pages-list__item menu-item-home\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/\">Jonny Hoang<\/a><\/li><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=837\">Network Automation<\/a><\/li><\/ul>\n\n\n<!--nextpage-->\n\n\n\n<p class=\"has-small-font-size\"><div class=\"fix-z-index-when-showing-intro-js region-animation-complete\" id=\"flyout-region\"><div id=\"flyout-layout\" class=\"detail-flyout-layout\" data-tab=\"post-detail\" data-subtab=\"\"><div class=\"flyout-left scrollable-area\" id=\"flyout-main-content\"><div id=\"flyout-content-region\"><div><div class=\"post-detail-region\"><div id=\"post-detail-layout\"><div class=\"content-region\"><div id=\"detail-layout\" class=\"is-showing-coursework has-more-posts\"><div class=\"detail-layout-content-wrapper\"><div class=\"detail-layout-title mighty-wysiwyg-content fr-view mighty-max-content-width\"> <\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/p>\n\n\n\n<p class=\"has-x-large-font-size\">Learning to Use Numbers<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong><strong>1.1 Integer Numbers (int)<\/strong><\/strong><\/p>\n\n\n\n<p>To determine whether the class type i.e integer or decimal etc you can type &#8216;<em>type (vlan<\/em>)&#8217; as an example.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-20.png\"><img loading=\"lazy\" decoding=\"async\" width=\"209\" height=\"86\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-20.png\" alt=\"\" class=\"wp-image-882\"\/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>1.2 Floating-Point Numbers (float)<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-22.png\"><img loading=\"lazy\" decoding=\"async\" width=\"215\" height=\"60\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-22.png\" alt=\"\" class=\"wp-image-885\"\/><\/a><\/figure>\n\n\n\n<p class=\"has-large-font-size\"><strong>Section 2: Basic Arithmetic Operations in Networking<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><div class=\"fix-z-index-when-showing-intro-js region-animation-complete\" id=\"flyout-region\"><div id=\"flyout-layout\" class=\"detail-flyout-layout\" data-tab=\"post-detail\" data-subtab=\"\"><div class=\"flyout-left scrollable-area\" id=\"flyout-main-content\"><div id=\"flyout-content-region\"><div><div class=\"post-detail-region\"><div id=\"post-detail-layout\"><div class=\"content-region\"><div id=\"detail-layout\" class=\"is-showing-coursework has-more-posts\"><div class=\"detail-layout-content-wrapper\"><div class=\"detail-layout-description mighty-wysiwyg-content mighty-max-content-width fr-view\"><h4><strong>2.1 Addition (+)<\/strong><\/h4><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/p>\n\n\n\n<p>This helps when adding the total bandwidth of each Transport in SD-WAN environment for licensing.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-23.png\"><img loading=\"lazy\" decoding=\"async\" width=\"249\" height=\"109\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-23.png\" alt=\"\" class=\"wp-image-886\"\/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>2.2 Subtraction (-)<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-24.png\"><img loading=\"lazy\" decoding=\"async\" width=\"482\" height=\"111\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-24.png\" alt=\"\" class=\"wp-image-887\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-24.png 482w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-24-300x69.png 300w\" sizes=\"(max-width: 482px) 100vw, 482px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>2.3 Multiplication (*)<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-25.png\"><img loading=\"lazy\" decoding=\"async\" width=\"341\" height=\"106\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-25.png\" alt=\"\" class=\"wp-image-888\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-25.png 341w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-25-300x93.png 300w\" sizes=\"(max-width: 341px) 100vw, 341px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><div class=\"fix-z-index-when-showing-intro-js region-animation-complete\" id=\"flyout-region\"><div id=\"flyout-layout\" class=\"detail-flyout-layout\" data-tab=\"post-detail\" data-subtab=\"\"><div class=\"flyout-left scrollable-area\" id=\"flyout-main-content\"><div id=\"flyout-content-region\"><div><div class=\"post-detail-region\"><div id=\"post-detail-layout\"><div class=\"content-region\"><div id=\"detail-layout\" class=\"is-showing-coursework has-more-posts\"><div class=\"detail-layout-content-wrapper\"><div class=\"detail-layout-description mighty-wysiwyg-content mighty-max-content-width fr-view\"><h4><strong>2.4 Division (\/)<\/strong><\/h4><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-26.png\"><img loading=\"lazy\" decoding=\"async\" width=\"418\" height=\"105\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-26.png\" alt=\"\" class=\"wp-image-889\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-26.png 418w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-26-300x75.png 300w\" sizes=\"(max-width: 418px) 100vw, 418px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>2.5 Floor Division (\/\/)<\/strong><\/p>\n\n\n\n<p>This calculation will give you the largest number which is equivalent or less than the division as WHOLE numbers. So for example 15 \/\/ 4 = 3.75, however it will round it off to 3 instead.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-27.png\"><img loading=\"lazy\" decoding=\"async\" width=\"382\" height=\"105\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-27.png\" alt=\"\" class=\"wp-image-890\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-27.png 382w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-27-300x82.png 300w\" sizes=\"(max-width: 382px) 100vw, 382px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>2.6 Modulus (%)<\/strong><\/p>\n\n\n\n<p>This is useful when you require the remainder from a division. So if you were to divide the bandwidth from requirements and total available you can find out the remainder bandwidth available to use. QoS is a good example. Example below shows that 300\/1000 = 3 and remainder is 100 available bandwidth.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-28.png\"><img loading=\"lazy\" decoding=\"async\" width=\"621\" height=\"113\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-28.png\" alt=\"\" class=\"wp-image-891\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-28.png 621w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-28-300x55.png 300w\" sizes=\"(max-width: 621px) 100vw, 621px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>2.7 Exponentiation (<\/strong>)**<\/p>\n\n\n\n<p>Works out the power to. So for example 2 to the power of 8 = 2x2x2x2x2x2x2x2 = 256. <\/p>\n\n\n\n<p>In the example below you can work out how many IP addresses required based on the cidr notation. So for a \/16 subnet i can work out how many total usable IP addresses available. I have included -2 so I can remove the broadcast and network address.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-29.png\"><img loading=\"lazy\" decoding=\"async\" width=\"345\" height=\"152\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-29.png\" alt=\"\" class=\"wp-image-892\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-29.png 345w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-29-300x132.png 300w\" sizes=\"(max-width: 345px) 100vw, 345px\" \/><\/a><\/figure>\n\n\n\n<p>Another example could be working out how many IP addresses available for a \/23 subnet.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-30.png\"><img loading=\"lazy\" decoding=\"async\" width=\"220\" height=\"82\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-30.png\" alt=\"\" class=\"wp-image-893\"\/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-31.png\"><img loading=\"lazy\" decoding=\"async\" width=\"286\" height=\"80\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-31.png\" alt=\"\" class=\"wp-image-894\"\/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading has-large-font-size\"><strong>Section 3: Built-In Functions for Number Manipulation in Networking<\/strong><\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>3.1 Absolute Value: <code>abs()<\/code><\/strong><\/p>\n\n\n\n<p>The <code>abs()<\/code> function in Python returns the absolute value of a number. The absolute value of a number is its distance from zero on the number line, regardless of its direction. This means it is always a non-negative value.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-32.png\"><img loading=\"lazy\" decoding=\"async\" width=\"346\" height=\"103\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-32.png\" alt=\"\" class=\"wp-image-895\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-32.png 346w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-32-300x89.png 300w\" sizes=\"(max-width: 346px) 100vw, 346px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>3.2 Rounding: <code>round()<\/code><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-33.png\"><img loading=\"lazy\" decoding=\"async\" width=\"307\" height=\"412\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-33.png\" alt=\"\" class=\"wp-image-896\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-33.png 307w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-33-224x300.png 224w\" sizes=\"(max-width: 307px) 100vw, 307px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>3.3 Power: <code>pow()<\/code><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-34.png\"><img loading=\"lazy\" decoding=\"async\" width=\"317\" height=\"86\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-34.png\" alt=\"\" class=\"wp-image-897\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-34.png 317w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-34-300x81.png 300w\" sizes=\"(max-width: 317px) 100vw, 317px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>3.4 Maximum and Minimum: <code>max()<\/code> and <code>min()<\/code><\/strong><\/p>\n\n\n\n<p>Good example with working the average maximum and minimum bandwidths.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-35.png\"><img loading=\"lazy\" decoding=\"async\" width=\"344\" height=\"154\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-35.png\" alt=\"\" class=\"wp-image-898\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-35.png 344w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-35-300x134.png 300w\" sizes=\"(max-width: 344px) 100vw, 344px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>3.5 Sum: <code>sum()<\/code><\/strong><\/p>\n\n\n\n<p>You can add the total bandwidth using this solution.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-36.png\"><img loading=\"lazy\" decoding=\"async\" width=\"349\" height=\"87\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-36.png\" alt=\"\" class=\"wp-image-899\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-36.png 349w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-36-300x75.png 300w\" sizes=\"(max-width: 349px) 100vw, 349px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>3.6 Divmod: <code>divmod()<\/code><\/strong><\/p>\n\n\n\n<p>You can use this when you are dividing something and then providing the remainder once it has been divided. Such as how many IPs in a subnet and what is left over to spare in IPs.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-37.png\"><img loading=\"lazy\" decoding=\"async\" width=\"512\" height=\"175\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-37.png\" alt=\"\" class=\"wp-image-900\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-37.png 512w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-37-300x103.png 300w\" sizes=\"(max-width: 512px) 100vw, 512px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-large-font-size\"><strong>Section 4: Converting Between Number Types in Networking<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><div class=\"fix-z-index-when-showing-intro-js region-animation-complete\" id=\"flyout-region\"><div id=\"flyout-layout\" class=\"detail-flyout-layout\" data-tab=\"post-detail\" data-subtab=\"\"><div class=\"flyout-left scrollable-area\" id=\"flyout-main-content\"><div id=\"flyout-content-region\"><div><div class=\"post-detail-region\"><div id=\"post-detail-layout\"><div class=\"content-region\"><div id=\"detail-layout\" class=\"is-showing-coursework has-more-posts\"><div class=\"detail-layout-content-wrapper\"><div class=\"detail-layout-description mighty-wysiwyg-content mighty-max-content-width fr-view\"><h4><strong>4.1 Converting to Integer: <code>int()<\/code><\/strong><\/h4><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/p>\n\n\n\n<p>String to Integer<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-38.png\"><img loading=\"lazy\" decoding=\"async\" width=\"270\" height=\"174\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-38.png\" alt=\"\" class=\"wp-image-905\"\/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>4.2 Converting to Float: <code>float()<\/code><\/strong><\/p>\n\n\n\n<p>String to Float (decimal points)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-39.png\"><img loading=\"lazy\" decoding=\"async\" width=\"327\" height=\"173\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-39.png\" alt=\"\" class=\"wp-image-906\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-39.png 327w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-39-300x159.png 300w\" sizes=\"(max-width: 327px) 100vw, 327px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-large-font-size\"><strong>Section 5: Practical Mathematical Operations in Networking<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>5.1 Calculating Subnet Hosts<\/strong><\/p>\n\n\n\n<p>The first example below is to takeaway the broadcast and network address to give you the real useable IPs.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-40.png\"><img loading=\"lazy\" decoding=\"async\" width=\"413\" height=\"221\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-40.png\" alt=\"\" class=\"wp-image-908\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-40.png 413w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-40-300x161.png 300w\" sizes=\"(max-width: 413px) 100vw, 413px\" \/><\/a><\/figure>\n\n\n\n<p>The 2nd example below is to include the broadcast and network IPs.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-41.png\"><img loading=\"lazy\" decoding=\"async\" width=\"348\" height=\"218\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-41.png\" alt=\"\" class=\"wp-image-909\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-41.png 348w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-41-300x188.png 300w\" sizes=\"(max-width: 348px) 100vw, 348px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>5.2 Calculating Link Utilization<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-42.png\"><img loading=\"lazy\" decoding=\"async\" width=\"439\" height=\"105\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-42.png\" alt=\"\" class=\"wp-image-910\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-42.png 439w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-42-300x72.png 300w\" sizes=\"(max-width: 439px) 100vw, 439px\" \/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>5.3 Converting Latency from Milliseconds to Seconds<\/strong><\/p>\n\n\n\n<p>The formula is to divide the ms by 1000.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-43.png\"><img loading=\"lazy\" decoding=\"async\" width=\"372\" height=\"234\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-43.png\" alt=\"\" class=\"wp-image-911\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-43.png 372w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-43-300x189.png 300w\" sizes=\"(max-width: 372px) 100vw, 372px\" \/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n<ul class=\"wp-block-page-list\"><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=591\">Cisco Catalyst SD-WAN<\/a><\/li><li class=\"wp-block-pages-list__item menu-item-home\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/\">Jonny Hoang<\/a><\/li><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=837\">Network Automation<\/a><\/li><\/ul>\n\n\n<!--nextpage-->\n\n\n\n<p class=\"has-large-font-size\">Using if, elif &amp; else Statements<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>&lt;<\/strong> &#8211; means it is less than<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>&gt;<\/strong> &#8211; means it is greater than<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>&lt;=<\/strong> &#8211; means it is less than or equal to. <\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>&gt;=<\/strong> &#8211; means it is more than or equal to.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><\/p>\n<\/blockquote>\n\n\n\n<div class=\"fix-z-index-when-showing-intro-js region-animation-complete\" id=\"flyout-region\"><div id=\"flyout-layout\" class=\"detail-flyout-layout\" data-tab=\"post-detail\" data-subtab=\"\"><div class=\"flyout-left scrollable-area\" id=\"flyout-main-content\"><div id=\"flyout-content-region\"><div><div class=\"post-detail-region\"><div id=\"post-detail-layout\"><div class=\"content-region\"><div id=\"detail-layout\" class=\"is-showing-coursework has-more-posts\"><div class=\"detail-layout-content-wrapper\"><div class=\"detail-layout-description mighty-wysiwyg-content mighty-max-content-width fr-view\"><h4><strong>1.1 Basic <code>if<\/code> Statement Structure<\/strong><\/h4><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div>\n\n\n\n<p>Example below is basically <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-44.png\"><img loading=\"lazy\" decoding=\"async\" width=\"570\" height=\"110\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-44.png\" alt=\"\" class=\"wp-image-919\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-44.png 570w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-44-300x58.png 300w\" sizes=\"(max-width: 570px) 100vw, 570px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-large-font-size\"><strong>2. The <code>else<\/code> Statement<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>2.1 Using <code>else<\/code> for Alternative Actions<\/strong><\/p>\n\n\n\n<p>Adding &#8216;<em>else<\/em>&#8216; to the &#8216;if&#8217; statement, allows you to return another action. I have two examples where if the device is reachable then return with a messgage to confirm, if not then return a message to say it isnt reachable.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-45.png\"><img loading=\"lazy\" decoding=\"async\" width=\"659\" height=\"380\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-45.png\" alt=\"\" class=\"wp-image-920\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-45.png 659w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-45-300x173.png 300w\" sizes=\"(max-width: 659px) 100vw, 659px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>3.1 Using <code>elif<\/code> for Multiple Conditions<\/strong><\/p>\n\n\n\n<p>&#8216;elif&#8217; statements are used for multiple options if the conditions require more options. In this example, if the link\/cpu is less than 50 print it is degraded, if it is equal to or less than 50 an it is equal to or below 75 then print is is moderate. Anything else print it is high. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-46.png\"><img loading=\"lazy\" decoding=\"async\" width=\"385\" height=\"197\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-46.png\" alt=\"\" class=\"wp-image-956\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-46.png 385w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-46-300x154.png 300w\" sizes=\"(max-width: 385px) 100vw, 385px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-large-font-size\"><strong>4. Nested <code>if<\/code> Statements<\/strong><\/p>\n\n\n\n<p>Nested statements are useful when you want to check multuple arguements before making a decision, such as measuring the CPU and Memory then taking action.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>4.1 Using Nested <code>if<\/code> Statements<\/strong><\/p>\n\n\n\n<p>The example below is basically checking if the device is reachable AND the Memory utilisation, if it is below 70 and device is reachable then display &#8220;Device is reachable and memory is OK&#8221;, However if it is reachable but 70 or more then display &#8220;Device is reachable but memory is HIGH&#8221;. The last else statement basically displays the message &#8220;Device is fucked&#8221; if it is not reachable.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-47.png\"><img loading=\"lazy\" decoding=\"async\" width=\"652\" height=\"258\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-47.png\" alt=\"\" class=\"wp-image-960\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-47.png 652w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-47-300x119.png 300w\" sizes=\"(max-width: 652px) 100vw, 652px\" \/><\/a><\/figure>\n\n\n\n<p>Another example is if we changed the &#8216;ram&#8217; measurements to &lt;= (highlighted in the example below) then the script would display &#8220;Device is reachable and memory is OK&#8221; instead of the first example above. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-48.png\"><img loading=\"lazy\" decoding=\"async\" width=\"636\" height=\"242\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-48.png\" alt=\"\" class=\"wp-image-961\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-48.png 636w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-48-300x114.png 300w\" sizes=\"(max-width: 636px) 100vw, 636px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-large-font-size\"><div class=\"fix-z-index-when-showing-intro-js region-animation-complete\" id=\"flyout-region\"><div id=\"flyout-layout\" class=\"detail-flyout-layout\" data-tab=\"post-detail\" data-subtab=\"\"><div class=\"flyout-left scrollable-area\" id=\"flyout-main-content\"><div id=\"flyout-content-region\"><div><div class=\"post-detail-region\"><div id=\"post-detail-layout\"><div class=\"content-region\"><div id=\"detail-layout\" class=\"is-showing-coursework has-more-posts\"><div class=\"detail-layout-content-wrapper\"><div class=\"detail-layout-description mighty-wysiwyg-content mighty-max-content-width fr-view\"><h3><strong>5. Practical Use Cases in Network Automation<\/strong><\/h3><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/p>\n\n\n\n<p>You can use if-elif-else statements to monitor multiple devices.<\/p>\n\n\n\n<p>The example below is calling from a dictonary with key value pairs such as the &#8216;Router-MCR&#8217; which is the key and &#8216;up&#8217; which is the value. Remember a dictionary will always have KEY VALUE pairs.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-51.png\"><img loading=\"lazy\" decoding=\"async\" width=\"311\" height=\"109\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-51.png\" alt=\"\" class=\"wp-image-964\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-51.png 311w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-51-300x105.png 300w\" sizes=\"(max-width: 311px) 100vw, 311px\" \/><\/a><\/figure>\n\n\n\n<p>In the &#8216;for&#8217; loop script the loop is called &#8216;device&#8217; which is the key (Router -MCR) and &#8216;status&#8217; is the value (up) which is used to store temporarily from the dictionary called from the devices.items(). <\/p>\n\n\n\n<p>Breaking this down, .items() is calling the dictionary and my example the dictionary is &#8216;devices&#8217;. So I call the &#8216;devices&#8217;.items() dictionary, once this is called the if-elif-else statement needs a place to store that dictionary whilst it will begin running in a loop until it is completed. So to hold the dictonary from &#8216;devices&#8217;.items() this then stores the dictionary in a temp holding space called &#8216;device&#8217; (key) &#8216;status&#8217; (value), the if-elif-else statement will run in a loop until it goes through all the dictionary key value pairs.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-49.png\"><img loading=\"lazy\" decoding=\"async\" width=\"432\" height=\"19\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-49.png\" alt=\"\" class=\"wp-image-962\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-49.png 432w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-49-300x13.png 300w\" sizes=\"(max-width: 432px) 100vw, 432px\" \/><\/a><\/figure>\n\n\n\n<p> &#8216;device&#8217; and &#8216;status&#8217; could be anything if you wanted to name it &#8216;hello&#8217; and &#8216;test&#8217; you can do.<\/p>\n\n\n\n<p>In a nutshell &#8216;device&#8217; in the &#8216;for&#8217; loop will hold the &#8216;key&#8217; (Router-MCR) and &#8216;value&#8217; will hold the &#8216;value&#8217;status&#8217; (up), if the value (status) is &#8216;up&#8217; display:<\/p>\n\n\n\n<p>Router-MCR is up and working.<\/p>\n\n\n\n<p>elif section checks the key(&#8216;device&#8217;) (&#8216;Switch-Lon&#8217;) and if the value(&#8216;status&#8217;) (&#8216;ok&#8217;) then display the following:<\/p>\n\n\n\n<p>Switch-Lon is running OK.<\/p>\n\n\n\n<p>else section basically if it doesn&#8217;t match anything else in the value(&#8216;status&#8217;) then just displaythe following<\/p>\n\n\n\n<p>Firewall-HK is down. <\/p>\n\n\n\n<p>The loop will check the key all the time until the value matches to whatever you have in the script, so it will check Router-MCR to see if it is up, if this matches then display the message, same goes for Switch-Lon and Firewall-HK, it will check to see if the value is &#8216;up&#8217; or &#8216;ok&#8217; until it finds a match. if it doesn&#8217;t match then display it is down.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-50.png\"><img loading=\"lazy\" decoding=\"async\" width=\"536\" height=\"367\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-50.png\" alt=\"\" class=\"wp-image-963\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-50.png 536w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-50-300x205.png 300w\" sizes=\"(max-width: 536px) 100vw, 536px\" \/><\/a><\/figure>\n\n\n\n<p>Another example of for loops:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-52.png\"><img loading=\"lazy\" decoding=\"async\" width=\"570\" height=\"350\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-52.png\" alt=\"\" class=\"wp-image-965\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-52.png 570w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-52-300x184.png 300w\" sizes=\"(max-width: 570px) 100vw, 570px\" \/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p class=\"has-large-font-size\"><strong>6. Combining Conditional Logic with Network Automation Tools<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>6.1 Example with Dynamic Status Check<\/strong><\/p>\n\n\n\n<p>You can obtain a list of devices and their statuses then write a script to produce an output of the device status.<\/p>\n\n\n\n<p>Example below is we have a list of devices which we need to check the status of the devices and then print out whatever the device is and what action is needed based on the status.<\/p>\n\n\n\n<p>&#8216;def&#8217; is a function, functions are used to save time instead of re-writing code you can call it again to if repetition is needed.  The example below, we defined a function called &#8216;get_device_status&#8217; and when this is called we have a placeholder called &#8216;device_name&#8217; and when the dictionary &#8216;statuses&#8217; is needed it will then take the key &#8216;Router1&#8217; and allows the function to utilise the key. Without the &#8216;device_name&#8217; parameter, the function wouldn&#8217;t know how to call the key in the dictionary. <\/p>\n\n\n\n<p>In other words, it would look like the below screenshot, the &#8220;Router1&#8221; in Green is equivalent to &#8216;device_name&#8217;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-54.png\"><img loading=\"lazy\" decoding=\"async\" width=\"345\" height=\"49\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-54.png\" alt=\"\" class=\"wp-image-968\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-54.png 345w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-54-300x43.png 300w\" sizes=\"(max-width: 345px) 100vw, 345px\" \/><\/a><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>\n\n<img decoding=\"async\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhEAAACFCAYAAADl9qpuAAAgAElEQVR4Xu2dd0CV1RvHP\/dyATcuHOE2NXeOckVuccZwgqIijhQF3Ii4EmeGAxVUzI2CG2duy4H+NDMzKS0VR1ou1DRH8XuZIkPuvVxQ4Ln\/lec94\/Ocl\/N9z3me86g+zPV+JPITAkJACAgBISAEhICOBFQiInQkJsWFgBAQAkJACAiBaAKZWkSoc+YnjyqCh09kM0Wf+Sz89KGWlZ4xIm+BnDy+\/xht3iCZL5nA9qq8mJk9IeLBv5mgs9LFrEAg04oIVX4bZl\/04lHPhozb9Vw\/W6jyU33ACAb3b061Mrl5eecmV84eJdBjKt\/8lrVfQoPw04Z6jpr027EIx0L7GN9iHIfuaLNcaVOxlEkbgRyUc\/oKXy9Y0HAwO2+\/2S4yX9JGO2OeVlO0hx9rPF+y0G44m8L+yZhmpZVsTSDziogCdsy75MmDHvqKCDXFei1i3ezynJoyk3UHw3maoxAW1Ypyd9NGTr\/txU5lxkfuHrR+tIKpAWEYWtKo0sxPu\/dGVdiO2een86npBfwa2rHkZ0OPRLt+pLmUoe1h6Pp0GqCaInYzWbbUkuve\/Rju8yOPU9F2Ml90AvzWCqsLN8R960LsC+zFo\/lo9v\/x31vrizScPQhkXxGh\/BHvsP4InkygdedNRLxrH8jqkjju2YXDWWc6DD\/BSwPPx4xaFMCIQnWbUzfvr3x78ApPDTyODKvO0PYwdH06gFCX7sLcI+Mourovzp4neKTF3Jf5ogPgt1xU\/V4bJu\/3oeFPY7HvuolboiPeskWydvPZV0So36Pbzj04\/9qftq7HePGu2TmdF5mMWxTeNbB69sfQ9jB0fdoOS5WPxv67mFlrE30bf8U5LV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24kwqdGHuRtdqXh1KUOtffkxhcucDF1Ol7GJiNCFlpQVAkJACAgBIZB+BDKdT4Sp9Wz2L\/oPr9LDOfQs\/cBIzUJACAgBISAEhMCbCWQKEfEqAVdpWn7px7CCi+nUdiUS2SnTWwgIASEgBITA2yOQCUREwlTgEVw\/tZPF7tPYEfbP26MmLQsBISAEhIAQEAKZL4un2EwICAEhIASEgBB4Nwhkgp2IdwOU9EIICAEhIASEgBB4nYCICJkRQkAICAEhIASEgF4ERETohU0eEgJCQAgIASEgBP4Pb+a4AgGiNqkAAAAASUVORK5CYII=\" alt=\"\"><\/code><\/pre>\n\n\n\n<p>The below screenshot finishes the function, this is where it will call out the key &#8216;device_name&#8217; &#8216;Router1&#8217; <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-55.png\"><img loading=\"lazy\" decoding=\"async\" width=\"522\" height=\"35\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-55.png\" alt=\"\" class=\"wp-image-969\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-55.png 522w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-55-300x20.png 300w\" sizes=\"(max-width: 522px) 100vw, 522px\" \/><\/a><\/figure>\n\n\n\n<p><strong><code>statuses.get()<\/code><\/strong>: &#8211; the &#8216;get()&#8217; method accesses the value that is part of the key i.e &#8216;Router1&#8217; and &#8216;up&#8217;<\/p>\n\n\n\n<p><strong>&#8216;device_name&#8217; <\/strong>&#8211; as mentioned before, it looks into the &#8216;statuses&#8217; dictionary to pull the key value pair. For example, if <code>device_name<\/code> is <code>\"Router1\"<\/code>, the <code>get()<\/code> method will look for <code>\"Router1\"<\/code> in the <code>statuses<\/code> dictionary.<\/p>\n\n\n\n<p><strong>&#8220;unknown&#8221;<\/strong> &#8211; The &#8220;unknown&#8221; section of the function is used as a backup should none of the dictionary key values are matched, this will give a cleaner output of the result of the code. Instead of stating &#8220;Status of Router5 is unknown&#8221; it will be &#8220;Status of unknown_device is unknown&#8221;. However, I have tried this in my lab and no error pops up when i remove this &#8220;unknown&#8221; section.<\/p>\n\n\n\n<p>The rest of the code is to create a list of devices and these do not need to match the dictionary, because in the list of &#8216;devices&#8217; it will run the list against the dictionary, and if the status isn&#8217;t listed or matching the and if-elif statement it will fall into the &#8216;else&#8217; statement which is unknown.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-56.png\"><img loading=\"lazy\" decoding=\"async\" width=\"587\" height=\"347\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-56.png\" alt=\"\" class=\"wp-image-970\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-56.png 587w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-56-300x177.png 300w\" sizes=\"(max-width: 587px) 100vw, 587px\" \/><\/a><\/figure>\n\n\n\n<p>Another example is adding another device which will require another <em>&#8216;elif&#8217;<\/em> statement. I have purposely removed the <em>&#8220;unknown&#8221;<\/em> in the script where you return the status of the devices in the dictionary. to see what the issue would be, no problem as the <em>&#8216;else&#8217;<\/em> catches it in the for loop section.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-57.png\"><img loading=\"lazy\" decoding=\"async\" width=\"679\" height=\"220\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-57.png\" alt=\"\" class=\"wp-image-973\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-57.png 679w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-57-300x97.png 300w\" sizes=\"(max-width: 679px) 100vw, 679px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-58.png\"><img loading=\"lazy\" decoding=\"async\" width=\"770\" height=\"376\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-58.png\" alt=\"\" class=\"wp-image-974\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-58.png 770w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-58-300x146.png 300w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-58-768x375.png 768w\" sizes=\"(max-width: 770px) 100vw, 770px\" \/><\/a><\/figure>\n\n\n<ul class=\"wp-block-page-list\"><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=591\">Cisco Catalyst SD-WAN<\/a><\/li><li class=\"wp-block-pages-list__item menu-item-home\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/\">Jonny Hoang<\/a><\/li><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=837\">Network Automation<\/a><\/li><\/ul>\n\n\n<!--nextpage-->\n\n\n\n<p class=\"has-large-font-size\">Learning to Use Booleans<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>1. What are Booleans?<\/strong><\/p>\n\n\n\n<p>It is a data type that will return the value of True or Fale and that is it.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-59.png\"><img loading=\"lazy\" decoding=\"async\" width=\"289\" height=\"43\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-59.png\" alt=\"\" class=\"wp-image-986\"\/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><div class=\"fix-z-index-when-showing-intro-js region-animation-complete\" id=\"flyout-region\"><div id=\"flyout-layout\" class=\"detail-flyout-layout\" data-tab=\"post-detail\" data-subtab=\"\"><div class=\"flyout-left scrollable-area\" id=\"flyout-main-content\"><div id=\"flyout-content-region\"><div><div class=\"post-detail-region\"><div id=\"post-detail-layout\"><div class=\"content-region\"><div id=\"detail-layout\" class=\"is-showing-coursework has-more-posts\"><div class=\"detail-layout-content-wrapper\"><div class=\"detail-layout-description mighty-wysiwyg-content mighty-max-content-width fr-view\"><h3><strong>2. Basic Boolean Operations<\/strong><\/h3><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>2.1 The <code>and<\/code> Operation<\/strong><\/p>\n\n\n\n<p>You can write a if statement based on the Boolean values. Example below if the router is up AND config is applied then print a resulting statement, and if both Boolean values are not TRUE then print another statement.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-60.png\"><img loading=\"lazy\" decoding=\"async\" width=\"687\" height=\"174\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-60.png\" alt=\"\" class=\"wp-image-987\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-60.png 687w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-60-300x76.png 300w\" sizes=\"(max-width: 687px) 100vw, 687px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>2.2 The <code>or<\/code> Operation<\/strong><\/p>\n\n\n\n<p>Now this example is based on whether one OR the other Boolean statement is true, so you can have one or the other such as if WAN1 link is up (True) but WAN2 link is down (False) then print a statement.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-61.png\"><img loading=\"lazy\" decoding=\"async\" width=\"463\" height=\"172\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-61.png\" alt=\"\" class=\"wp-image-988\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-61.png 463w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-61-300x111.png 300w\" sizes=\"(max-width: 463px) 100vw, 463px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>2.3 The <code>not<\/code> Operation<\/strong><\/p>\n\n\n\n<p>This NOT keyword does the opposite of what is already set on the script. So if it is True and you apply &#8216;not&#8217; then it will make it false. In the example below the &#8216;not&#8217; keyword checks &#8216;WAN1&#8217;, and &#8216;WAN1&#8217; is set to true but with NOT, this changes it to False. Now because WAN1 is now set to False and WAN2 is True, the conditions do not match(because of the AND), therfore the &#8216;if&#8217; statement will return &#8220;both Transports are goosed&#8221;. In order to print &#8220;We have one Transport working&#8221; we would need WAN1 configured as False then when we call the &#8216;if&#8217; and &#8216;not&#8217; keyword if will flip to True and then it matches WAn2 of True. In other words the conditions have to match. I.e True an and True or False and False.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-62.png\"><img loading=\"lazy\" decoding=\"async\" width=\"471\" height=\"168\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-62.png\" alt=\"\" class=\"wp-image-989\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-62.png 471w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-62-300x107.png 300w\" sizes=\"(max-width: 471px) 100vw, 471px\" \/><\/a><\/figure>\n\n\n\n<p>Another example of the NOT keyword: Below example is set primary as false and backup as true. The NOT keyword is used in the if statement so primary changes to True. Next it will check &#8216;backup&#8217; which is True so if primary is true AND backup is True then print the statement&#8221;Switching to backup link&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-69.png\"><img loading=\"lazy\" decoding=\"async\" width=\"421\" height=\"177\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-69.png\" alt=\"\" class=\"wp-image-1002\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-69.png 421w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-69-300x126.png 300w\" sizes=\"(max-width: 421px) 100vw, 421px\" \/><\/a><\/figure>\n\n\n\n<p>Another example with Boolean data set:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-63.png\"><img loading=\"lazy\" decoding=\"async\" width=\"540\" height=\"372\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-63.png\" alt=\"\" class=\"wp-image-990\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-63.png 540w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-63-300x207.png 300w\" sizes=\"(max-width: 540px) 100vw, 540px\" \/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>3. Boolean Comparisons<\/strong><\/p>\n\n\n\n<p class=\"has-small-font-size\"><div class=\"fix-z-index-when-showing-intro-js region-animation-complete\" id=\"flyout-region\"><div id=\"flyout-layout\" class=\"detail-flyout-layout\" data-tab=\"post-detail\" data-subtab=\"\"><div class=\"flyout-left scrollable-area\" id=\"flyout-main-content\"><div id=\"flyout-content-region\"><div><div class=\"post-detail-region\"><div id=\"post-detail-layout\"><div class=\"content-region\"><div id=\"detail-layout\" class=\"is-showing-coursework has-more-posts\"><div class=\"detail-layout-content-wrapper\"><div class=\"detail-layout-description mighty-wysiwyg-content mighty-max-content-width fr-view\"><h4><strong>3.1 Equality (<code>==<\/code>)<\/strong><\/h4><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-64.png\"><img loading=\"lazy\" decoding=\"async\" width=\"432\" height=\"177\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-64.png\" alt=\"\" class=\"wp-image-997\" style=\"aspect-ratio:2.440677966101695;width:432px;height:auto\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-64.png 432w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-64-300x123.png 300w\" sizes=\"(max-width: 432px) 100vw, 432px\" \/><\/a><\/figure>\n\n\n\n<p>Another example:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-68.png\"><img loading=\"lazy\" decoding=\"async\" width=\"302\" height=\"172\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-68.png\" alt=\"\" class=\"wp-image-1001\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-68.png 302w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-68-300x171.png 300w\" sizes=\"(max-width: 302px) 100vw, 302px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>3.2 Inequality (<code>!=<\/code>)<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-65.png\"><img loading=\"lazy\" decoding=\"async\" width=\"592\" height=\"168\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-65.png\" alt=\"\" class=\"wp-image-998\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-65.png 592w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-65-300x85.png 300w\" sizes=\"(max-width: 592px) 100vw, 592px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>3.3 Greater Than (<code>&gt;<\/code>) and Less Than (<code>&lt;<\/code>)<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-67.png\"><img loading=\"lazy\" decoding=\"async\" width=\"742\" height=\"370\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-67.png\" alt=\"\" class=\"wp-image-1000\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-67.png 742w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-67-300x150.png 300w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>5. Using Booleans in Conditional Statements<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>5.1 <code>if<\/code>, <code>elif<\/code>, and <code>else<\/code> Statements<\/strong><\/p>\n\n\n\n<p>Int his example, the &#8216;elif&#8217; statement is basically saying if it is 50% or less but less than 75% then display the message &#8220;Memory usilisation is Moderate&#8221;. In the script the &#8216;memory&#8217; is 80% therefore it skips this condition.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-70.png\"><img loading=\"lazy\" decoding=\"async\" width=\"477\" height=\"221\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-70.png\" alt=\"\" class=\"wp-image-1004\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-70.png 477w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-70-300x139.png 300w\" sizes=\"(max-width: 477px) 100vw, 477px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>6. Combining Multiple Conditions<\/strong><\/p>\n\n\n\n<p>You can combine multiple Boolean statements together such as &#8216;and&#8217;, &#8216;or&#8217; and &#8216;not&#8217;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-71.png\"><img loading=\"lazy\" decoding=\"async\" width=\"223\" height=\"64\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-71.png\" alt=\"\" class=\"wp-image-1005\"\/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-72.png\"><img loading=\"lazy\" decoding=\"async\" width=\"532\" height=\"137\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-72.png\" alt=\"\" class=\"wp-image-1006\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-72.png 532w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-72-300x77.png 300w\" sizes=\"(max-width: 532px) 100vw, 532px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-73.png\"><img loading=\"lazy\" decoding=\"async\" width=\"457\" height=\"222\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-73.png\" alt=\"\" class=\"wp-image-1007\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-73.png 457w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-73-300x146.png 300w\" sizes=\"(max-width: 457px) 100vw, 457px\" \/><\/a><\/figure>\n\n\n<ul class=\"wp-block-page-list\"><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=591\">Cisco Catalyst SD-WAN<\/a><\/li><li class=\"wp-block-pages-list__item menu-item-home\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/\">Jonny Hoang<\/a><\/li><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=837\">Network Automation<\/a><\/li><\/ul>\n\n\n<!--nextpage-->\n\n\n\n<p class=\"has-large-font-size\">Learning to use While and For Loops<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>1. The <code>for<\/code> Loop<\/strong><\/p>\n\n\n\n<p>&#8216;for&#8217; loop is used to go through the sequence such as a list, dictionary, tuple, string or range which then exectures the code until the loop finishes. Such as a list of devices and configs.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>1.1 Basic <code>for<\/code> Loop<\/strong><\/p>\n\n\n\n<p>The &#8216;device&#8217; word is basically creating a holding place which is where the &#8216;for&#8217; loop is called\/created, then the loop called &#8216;device&#8217; will then call the &#8216;list&#8217; names &#8216;devices&#8217; and in that list contains the list of devices. It will then print the loop called &#8216;device&#8217; and that contains the list of &#8216;devices&#8217; (Router 1 etc). &#8216;device&#8217; could be anything as you are just naming the &#8216;for&#8217; loop. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-74.png\"><img loading=\"lazy\" decoding=\"async\" width=\"508\" height=\"179\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-74.png\" alt=\"\" class=\"wp-image-1010\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-74.png 508w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-74-300x106.png 300w\" sizes=\"(max-width: 508px) 100vw, 508px\" \/><\/a><\/figure>\n\n\n\n<p>I have another example which I have renamed the &#8216;for&#8217; loop to be TEST as an example where it can be anything, but once you have named the loop, and you want to display anything related to the loop it must match. It is always recommended to have a good naming system so it makes sense.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-75.png\"><img loading=\"lazy\" decoding=\"async\" width=\"366\" height=\"131\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-75.png\" alt=\"\" class=\"wp-image-1011\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-75.png 366w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-75-300x107.png 300w\" sizes=\"(max-width: 366px) 100vw, 366px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-79.png\"><img loading=\"lazy\" decoding=\"async\" width=\"445\" height=\"159\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-79.png\" alt=\"\" class=\"wp-image-1017\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-79.png 445w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-79-300x107.png 300w\" sizes=\"(max-width: 445px) 100vw, 445px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>1.2 Using <code>range()<\/code> with <code>for<\/code> Loops<\/strong><\/p>\n\n\n\n<p>using &#8216;range()&#8217; keyword allow you to repeat the loop over again with x amount of times. <\/p>\n\n\n\n<p>In the example below, I created a &#8216;range(10) which means repeat this process 10 times, however you will see in the  f-string I called the loop &#8216;pinging&#8217; with a + 1. the reason is remember the indexing where it will always start with a 0 not 1. If I didn&#8217;t add the &#8216;+ 1&#8217; it will begin with &#8220;Pinging 0 for Router 1&#8221;. So to make this more realistic as an example we started with &#8216;+ 1&#8217;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-76.png\"><img loading=\"lazy\" decoding=\"async\" width=\"520\" height=\"290\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-76.png\" alt=\"\" class=\"wp-image-1012\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-76.png 520w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-76-300x167.png 300w\" sizes=\"(max-width: 520px) 100vw, 520px\" \/><\/a><\/figure>\n\n\n\n<p><strong>1.3 Nested <code>for<\/code> Loops<\/strong><\/p>\n\n\n\n<p>This is used when you create a &#8216;for&#8217; loop and to call another loop within the loop. so this runs a loop inside a loop.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-77.png\"><img loading=\"lazy\" decoding=\"async\" width=\"644\" height=\"333\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-77.png\" alt=\"\" class=\"wp-image-1014\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-77.png 644w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-77-300x155.png 300w\" sizes=\"(max-width: 644px) 100vw, 644px\" \/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p class=\"has-large-font-size\"><strong>2. The <code>while<\/code> Loop<\/strong><\/p>\n\n\n\n<p>You use the &#8216;while&#8217; loop based on a specific condition, which will be repeated until it is no longer &#8216;true&#8217;. A good example would be keep ping the device while it is offline, until it becomes online then stop the ping.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>2.1 Basic <code>while<\/code> Loop<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-80.png\"><img loading=\"lazy\" decoding=\"async\" width=\"470\" height=\"173\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-80.png\" alt=\"\" class=\"wp-image-1021\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-80.png 470w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-80-300x110.png 300w\" sizes=\"(max-width: 470px) 100vw, 470px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>2.2 Infinite Loops and Break Statement<\/strong><\/p>\n\n\n\n<p>&#8216;break&#8217; keyword can help stop a while loop prematurely. <\/p>\n\n\n\n<p>The example below, sets the &#8216;attempt&#8217; to 1, so the first iteration it already sets it to 1 which will then display &#8220;Pinging attempt 1&#8221;, the loop then incremements 1 so &#8216;attempt&#8217; is now 2, it will run through the 2nd iteration and displays &#8220;Pinging attempt 2&#8221;, it will add another 1 to it so it makes it 3, the third iteration will repeat itself and display &#8220;Pinging attempt 3&#8221;. an increments 1 which &#8216;attempt&#8217; is now 4, now the loop becomes &#8216;True&#8217; (Boolean) which the nested &#8216;if&#8217; statement comes in if it is more than\/greater than 3 then display &#8220;Maximum attempts reached. stopping&#8221;. The &#8216;break&#8217; keyword stops the loop.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-81.png\"><img loading=\"lazy\" decoding=\"async\" width=\"595\" height=\"257\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-81.png\" alt=\"\" class=\"wp-image-1022\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-81.png 595w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-81-300x130.png 300w\" sizes=\"(max-width: 595px) 100vw, 595px\" \/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>3. Controlling Loops with <code>break<\/code> and <code>continue<\/code><\/strong><\/p>\n\n\n\n<p>&#8216;break&#8217; as descrived previously breaks the\/stops the loop but with &#8216;continue &#8216; you can carry on with the loop and moves onto the next iteration.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>3.1 Using <code>break<\/code> in Loops<\/strong><\/p>\n\n\n\n<p>The example below, we create a list which has the status of down and up.<\/p>\n\n\n\n<p>We then created a for loop called &#8216;status&#8217; and call in th elist created &#8216;device_status&#8217;. Nested &#8216;if&#8217; statement checks through different iterations until there is a match. Because the first and second iteration it is &#8216;down&#8217; based on the list (device_status) it will continue to run through the loop until a match is found if it is &#8216;up&#8217;. Once it is &#8216;up&#8217; then the &#8216;break&#8217; comes into play.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-82.png\"><img loading=\"lazy\" decoding=\"async\" width=\"665\" height=\"249\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-82.png\" alt=\"\" class=\"wp-image-1023\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-82.png 665w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-82-300x112.png 300w\" sizes=\"(max-width: 665px) 100vw, 665px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>3.2 Using <code>continue<\/code> in Loops<\/strong><\/p>\n\n\n\n<p>&#8216;continue&#8217; statement will skip the rest of the loop onto the next iteration. <\/p>\n\n\n\n<p>In this example below, it will look for the status that matches up from the list. Once it has a match it will skip to the next iteration until there ISN&#8217;T a match for (&#8220;up&#8221;).  So with the first iteration, the loop doesn&#8217;t have a match for &#8220;up&#8221; so it prints the message, the 2nd iteration matches &#8220;up&#8221; so it will skip this iteration until it goes through all the items in the list.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-83.png\"><img loading=\"lazy\" decoding=\"async\" width=\"498\" height=\"181\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-83.png\" alt=\"\" class=\"wp-image-1024\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-83.png 498w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-83-300x109.png 300w\" sizes=\"(max-width: 498px) 100vw, 498px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>4. Nested Loops in Network Automation<\/strong><\/p>\n\n\n\n<p>You can use nested loops for more complex operations and using different parameters to different devices.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>4.1 Basic Nested <code>for<\/code> Loops<\/strong><\/p>\n\n\n\n<p>The example below is a nested for loop in a for loop. It will loop the &#8216;devices&#8217; list then the 2nd list called &#8216;configs&#8217;. So it will start with &#8216;Router1&#8217; and &#8216;IP&#8217;, &#8216;VLAN&#8217; and &#8216;Hostname&#8217; then &#8216;Switch1&#8217; and so on.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-84.png\"><img loading=\"lazy\" decoding=\"async\" width=\"711\" height=\"268\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-84.png\" alt=\"\" class=\"wp-image-1025\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-84.png 711w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-84-300x113.png 300w\" sizes=\"(max-width: 711px) 100vw, 711px\" \/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>5. Practical Use Cases of Loops in Network Automation<\/strong><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Using Loops is very helpful when configuring a number of devices.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>5.1 Automating Device Configuration<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-85.png\"><img loading=\"lazy\" decoding=\"async\" width=\"860\" height=\"332\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-85.png\" alt=\"\" class=\"wp-image-1026\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-85.png 860w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-85-300x116.png 300w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-85-768x296.png 768w\" sizes=\"(max-width: 860px) 100vw, 860px\" \/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n<ul class=\"wp-block-page-list\"><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=591\">Cisco Catalyst SD-WAN<\/a><\/li><li class=\"wp-block-pages-list__item menu-item-home\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/\">Jonny Hoang<\/a><\/li><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=837\">Network Automation<\/a><\/li><\/ul>\n\n\n<!--nextpage-->\n\n\n\n<p class=\"has-large-font-size\">Learning to Use Lists<\/p>\n\n\n\n<p class=\"has-large-font-size\"><div class=\"fix-z-index-when-showing-intro-js region-animation-complete\" id=\"flyout-region\"><div id=\"flyout-layout\" class=\"detail-flyout-layout\" data-tab=\"post-detail\" data-subtab=\"\"><div class=\"flyout-left scrollable-area\" id=\"flyout-main-content\"><div id=\"flyout-content-region\"><div><div class=\"post-detail-region\"><div id=\"post-detail-layout\"><div class=\"content-region\"><div id=\"detail-layout\" class=\"is-showing-coursework has-more-posts\"><div class=\"detail-layout-content-wrapper\"><div class=\"detail-layout-description mighty-wysiwyg-content mighty-max-content-width fr-view\"><h3><strong>1. Creating and Accessing Lists<\/strong><\/h3><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/p>\n\n\n\n<p>Lists will always use [].<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>1.1 Creating Lists<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-86.png\"><img loading=\"lazy\" decoding=\"async\" width=\"458\" height=\"64\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-86.png\" alt=\"\" class=\"wp-image-1028\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-86.png 458w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-86-300x42.png 300w\" sizes=\"(max-width: 458px) 100vw, 458px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>1.2 Accessing List Elements<\/strong><\/p>\n\n\n\n<p>Remember, index 0 is always the first, -1 means it will always choose whatever is last on the list.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-87.png\"><img loading=\"lazy\" decoding=\"async\" width=\"438\" height=\"219\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-87.png\" alt=\"\" class=\"wp-image-1029\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-87.png 438w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-87-300x150.png 300w\" sizes=\"(max-width: 438px) 100vw, 438px\" \/><\/a><\/figure>\n\n\n\n<p>The example below is accessing the items in the list but then displaying the message with whatever list is chosen in the index.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-88.png\"><img loading=\"lazy\" decoding=\"async\" width=\"470\" height=\"329\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-88.png\" alt=\"\" class=\"wp-image-1030\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-88.png 470w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-88-300x210.png 300w\" sizes=\"(max-width: 470px) 100vw, 470px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>2. Modifying Lists<\/strong><\/p>\n\n\n\n<p>Lists are muteable, this means you can change them after it has been created.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>2.1 Adding Elements to a List<\/strong><\/p>\n\n\n\n<p>There are two ways to add items into an existing list. The first method with adding another router called &#8216;Router2&#8217;, &#8216;append()&#8217; will add the item into the end of the list. If you wanted to add the item at the start or which ever position on the list you can use the .&#8217;insert()&#8217; keyword. the &#8216;0&#8217; in the insert() is telling the code to add the ip &#8216;4.4.4.4&#8217; at the start of the list.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-89.png\"><img loading=\"lazy\" decoding=\"async\" width=\"452\" height=\"315\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-89.png\" alt=\"\" class=\"wp-image-1031\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-89.png 452w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-89-300x209.png 300w\" sizes=\"(max-width: 452px) 100vw, 452px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>2.2 Removing Elements from a List<\/strong><\/p>\n\n\n\n<p>The below example allows you to remove the item on the list by typing the exact match.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-90.png\"><img loading=\"lazy\" decoding=\"async\" width=\"442\" height=\"93\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-90.png\" alt=\"\" class=\"wp-image-1032\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-90.png 442w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-90-300x63.png 300w\" sizes=\"(max-width: 442px) 100vw, 442px\" \/><\/a><\/figure>\n\n\n\n<p>An alternative to remove the item on the list by using indexing you can use the pop() keyword.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-91.png\"><img loading=\"lazy\" decoding=\"async\" width=\"314\" height=\"85\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-91.png\" alt=\"\" class=\"wp-image-1033\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-91.png 314w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-91-300x81.png 300w\" sizes=\"(max-width: 314px) 100vw, 314px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>2.3 Modifying Elements in a List<\/strong><\/p>\n\n\n\n<p>The below example allows you to change the item on the list referring to the index value.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-92.png\"><img loading=\"lazy\" decoding=\"async\" width=\"422\" height=\"98\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-92.png\" alt=\"\" class=\"wp-image-1034\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-92.png 422w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-92-300x70.png 300w\" sizes=\"(max-width: 422px) 100vw, 422px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-93.png\"><img loading=\"lazy\" decoding=\"async\" width=\"226\" height=\"91\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-93.png\" alt=\"\" class=\"wp-image-1035\"\/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-94.png\"><img loading=\"lazy\" decoding=\"async\" width=\"540\" height=\"265\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-94.png\" alt=\"\" class=\"wp-image-1036\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-94.png 540w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-94-300x147.png 300w\" sizes=\"(max-width: 540px) 100vw, 540px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>3. Iterating Through Lists<\/strong><\/p>\n\n\n\n<p>You may need to do something with a list which goes through different iterations in a loop, for example you may need to check a list of IP addresses in a list. So using a loop will save you time.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>3.1 Using a <code>for<\/code> Loop to Iterate Through a List<\/strong><\/p>\n\n\n\n<p>The example below, I ave created a list which contains a list of devices. I then create a &#8216;for&#8217; loop called &#8216;device&#8217; and the &#8216;device &#8216;for&#8217; loop will call in the list &#8216;devices&#8217;. I then display the list of devices.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-95.png\"><img loading=\"lazy\" decoding=\"async\" width=\"384\" height=\"175\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-95.png\" alt=\"\" class=\"wp-image-1037\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-95.png 384w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-95-300x137.png 300w\" sizes=\"(max-width: 384px) 100vw, 384px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-97.png\"><img loading=\"lazy\" decoding=\"async\" width=\"711\" height=\"205\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-97.png\" alt=\"\" class=\"wp-image-1041\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-97.png 711w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-97-300x86.png 300w\" sizes=\"(max-width: 711px) 100vw, 711px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>3.2 Using <code>enumerate()<\/code> to Get Index and Value<\/strong><\/p>\n\n\n\n<p>&#8216;enumerate()&#8217; allows you to get the index positioning of the list as well as the list of items in that list.<\/p>\n\n\n\n<p>The example below we have a list created called &#8216;ip_addresses&#8217; and contains IPs. <\/p>\n\n\n\n<p>We then create a &#8216;for&#8217; loop called &#8216;index&#8217; (this could be called anything) and we create the enumerate called &#8216;ip&#8217; (this could also be called anything) but it is used to call the &#8216;enumerate()&#8217; function. <\/p>\n\n\n\n<p>For each iteration it prints the device number and then the IP address. The device number is used for every iteration to add 1 to it. In this example it is index +1 to begin with on the first iteration, as index begins with 0 it will be 0+1 = 1 and it will print out the first item on the list of &#8216;IP_addreses&#8217;, after the first iteration it will be 1+1 = 2 and so on.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-96.png\"><img loading=\"lazy\" decoding=\"async\" width=\"525\" height=\"159\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-96.png\" alt=\"\" class=\"wp-image-1039\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-96.png 525w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-96-300x91.png 300w\" sizes=\"(max-width: 525px) 100vw, 525px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>4. Slicing Lists<\/strong><\/p>\n\n\n\n<p>Slicing allows you to create a new list from an existing list.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>4.1 Basic Slicing Syntax<\/strong><\/p>\n\n\n\n<p>Basic slicing you use &#8216;list[start:stop]&#8217;, so you would call the existing with the index.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-98.png\"><img loading=\"lazy\" decoding=\"async\" width=\"718\" height=\"156\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-98.png\" alt=\"\" class=\"wp-image-1042\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-98.png 718w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-98-300x65.png 300w\" sizes=\"(max-width: 718px) 100vw, 718px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>4.2 Omitting Start or Stop<\/strong><\/p>\n\n\n\n<p>You don&#8217;t have to enter the start:stop and just either enter the start or just the stop.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-99.png\"><img loading=\"lazy\" decoding=\"async\" width=\"719\" height=\"85\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-99.png\" alt=\"\" class=\"wp-image-1043\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-99.png 719w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-99-300x35.png 300w\" sizes=\"(max-width: 719px) 100vw, 719px\" \/><\/a><\/figure>\n\n\n\n<p>The below example illustrates different ways to slice the first 3 items and also slicing the last two items.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-103.png\"><img loading=\"lazy\" decoding=\"async\" width=\"895\" height=\"221\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-103.png\" alt=\"\" class=\"wp-image-1047\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-103.png 895w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-103-300x74.png 300w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-103-768x190.png 768w\" sizes=\"(max-width: 895px) 100vw, 895px\" \/><\/a><\/figure>\n\n\n\n<p><img decoding=\"async\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAacAAABECAYAAAAlSPoAAAAgAElEQVR4Xu1dCVyN2Rt+7u22UKkUZcmSMbYxljDWmchSZCJZajSksVPZE8LYYpRdoQyGiMlSdiJ7jJ3IGCqDyZ8WzDAU\/c9b9+a6bt3vu91rSt\/5\/d5ft3vPd5bnPd95znnPe84RNS77WQ6EICAgICAgICAgIFCMEBAJ5FSMtCEURUBAQEBAQEAgFwGBnISGICAgICAgICBQ7BAQyKnYqUQokICAgICAgICAQE5CG+CEgLiMKYxET\/HsRelconyBPzjhVBwilcVnxaEYQhkEBIqEQMkgJ0lDjD63DYPq6ORV9vV5LGzyHTYlvy1S5YWHuSEgMu2BRben4vn3rTFt32tuD6kTy6ARBu9ZBQ\/zwwjoOA1xT4oPEeaSkxmr1G8KFZvC\/o9Up7I8nlnH4raVi3+HfXZkoqT5C8TEA1charFGoGSQE\/RhVqMyTPREkDT0wpLVNoiw\/YjkJDJBc18\/ODxfj7lhiXhTBJWKTBvAaeJIuPVqiVpWBshKS0HCno1YHhCBaxnFpzOWr6LIzAVL\/\/BHZn\/tkpPIwgWLEgLxtf5NhLR2wZobRUG6CEpS8uh75OTNIpySRnrB\/mbJPWDDPk9kYs9EJP1+J\/s7k8lzNctUlj2nK312GvvbUCAnNZEUHitBCJQQcnqHqE6ziYja3wTbmn1EchJbw+PgPrhf8UL3cWeRrbaCy6BF8F7Mb3keG5fG4FJKFsxsu2PQZBdUjhsP1\/67kVYM+eljkROgA\/Nm9mhm\/DuOH03GS7Vx1vyD75HTIJb+8QLy+JJ978NkB5MMJo2ZjGESy2QYk6Lqdy5L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H+oYaB2EAo1\/yHuO1r5kgUb85LbeRO476jzJY0vmIs6VnGhG0UOhDLJ\/KU8+nn6KyfRmX5BLPJnLaC1Hk7MyxbyoDrQPrYHcD0QAlD8RuSyQzmgwQWtzskPLydGAZo20H0zZkVdk+qPBCZ0UQUHZ2hEXvZGjDLUf8rqjdSQKNFihdT7alkCBKzlpU2+yOmr8hIh3ahA+CQiUCgQ0Rk6lAq2PVEnqiIcxoTU7MlHSXh4hlBwEtDJzKjnVF0oqIKARBF6YsSEwLXxzOfhVIzkKiRSKgOyQVvpLMwXZKRjFBLayuT7l5M4nBHkEJGWNYaArYsjooMG0kfim4T2sd9yAVDW8sildnldmCMoQEPj0EBCZuWBCIrnEyQXvJVgQqc5OvE8Pn49fIx0YVSiHrCcZeKVNU97Hr9gnnKMe7Nedx0+9y+TTdtbJWfhWIKdPWOdC1QQEBAQEBEohAsLMqRQqXaiygICAgIBAcUdAIKfiriGhfAICAgICAqUQgf8DplIkf\/\/MrZQAAAAASUVORK5CYII=\" alt=\"\"><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-104.png\"><img loading=\"lazy\" decoding=\"async\" width=\"421\" height=\"69\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-104.png\" alt=\"\" class=\"wp-image-1048\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-104.png 421w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-104-300x49.png 300w\" sizes=\"(max-width: 421px) 100vw, 421px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>5. List Comprehensions<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>5.1 Basic List Comprehension<\/strong><\/p>\n\n\n\n<p>The example below, we created &#8216;uppercase&#8217; where we called the action upper() and called it device.upper(), the &#8216;for device in devices&#8217; is then used as a loop and iterates over each item in the list &#8216;devices&#8217; and changes it to Capitals.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-106.png\"><img loading=\"lazy\" decoding=\"async\" width=\"611\" height=\"89\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-106.png\" alt=\"\" class=\"wp-image-1054\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-106.png 611w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-106-300x44.png 300w\" sizes=\"(max-width: 611px) 100vw, 611px\" \/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>5.2 Filtering with List Comprehensions<\/strong><\/p>\n\n\n\n<p>The example below can be broken down into parts for easy understanding:<\/p>\n\n\n\n<p>device.startswith(&#8220;Rout&#8221;)] &#8211; Is to include anything that starts with &#8216;Rout&#8217; in the list called &#8216;devices&#8217;<\/p>\n\n\n\n<p>&#8216;for device in devices&#8221; &#8211; Is a loop that iterates over each &#8216;device&#8217; in the &#8216;devices&#8217; list.<\/p>\n\n\n\n<p>&#8216;device for device in devices if is a list comprehension that filters and creates a new list. It will only include devices that have the word &#8220;Rout&#8221;.<\/p>\n\n\n\n<p>What is highlighted in BLUE below can be called anything. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-105.png\"><img loading=\"lazy\" decoding=\"async\" width=\"767\" height=\"132\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-105.png\" alt=\"\" class=\"wp-image-1052\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-105.png 767w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-105-300x52.png 300w\" sizes=\"(max-width: 767px) 100vw, 767px\" \/><\/a><\/figure>\n\n\n\n<p>The below example starting with &#8216;lowercase&#8217; in Yellow is changing the list of &#8216;devices&#8217; to lower case. <\/p>\n\n\n\n<p>We create another comprehension called &#8216;router_devices&#8217; and &#8216;device&#8217; in pink is doing something with the item. the &#8216;devices&#8217; after the for in Orange is what you will be looping over again in the for loop.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-107.png\"><img loading=\"lazy\" decoding=\"async\" width=\"851\" height=\"112\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-107.png\" alt=\"\" class=\"wp-image-1056\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-107.png 851w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-107-300x39.png 300w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-107-768x101.png 768w\" sizes=\"(max-width: 851px) 100vw, 851px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>6. Sorting and Reversing Lists<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>6.1 Sorting Lists<\/strong><\/p>\n\n\n\n<p>You can sort lists in ascending order.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-108.png\"><img loading=\"lazy\" decoding=\"async\" width=\"377\" height=\"138\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-108.png\" alt=\"\" class=\"wp-image-1058\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-108.png 377w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-108-300x110.png 300w\" sizes=\"(max-width: 377px) 100vw, 377px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-110.png\"><img loading=\"lazy\" decoding=\"async\" width=\"784\" height=\"88\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-110.png\" alt=\"\" class=\"wp-image-1060\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-110.png 784w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-110-300x34.png 300w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-110-768x86.png 768w\" sizes=\"(max-width: 784px) 100vw, 784px\" \/><\/a><\/figure>\n\n\n\n<p>Or you can sort out in descending order. &#8216;sorted&#8217; is a built in function in Python. it is used to return a new, sorted list. In essence it will provide a new list based on what you have requested.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-109.png\"><img loading=\"lazy\" decoding=\"async\" width=\"447\" height=\"99\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-109.png\" alt=\"\" class=\"wp-image-1059\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-109.png 447w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-109-300x66.png 300w\" sizes=\"(max-width: 447px) 100vw, 447px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-111.png\"><img loading=\"lazy\" decoding=\"async\" width=\"856\" height=\"90\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-111.png\" alt=\"\" class=\"wp-image-1061\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-111.png 856w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-111-300x32.png 300w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-111-768x81.png 768w\" sizes=\"(max-width: 856px) 100vw, 856px\" \/><\/a><\/figure>\n\n\n<ul class=\"wp-block-page-list\"><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=591\">Cisco Catalyst SD-WAN<\/a><\/li><li class=\"wp-block-pages-list__item menu-item-home\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/\">Jonny Hoang<\/a><\/li><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=837\">Network Automation<\/a><\/li><\/ul>\n\n\n<!--nextpage-->\n\n\n\n<p class=\"has-large-font-size\">Learning to Use Dictionaries<\/p>\n\n\n\n<p>Dictionaries are used to store in Key Value pairs (I briefly touch up on this subject in the <a href=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=5\" data-type=\"link\" data-id=\"http:\/\/jaychou.co.uk\/?page_id=837&amp;page=5\">using if, elif and else statement section<\/a>). Useful in managing configs, storing device info.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>1. Creating and Accessing Dictionaries<\/strong><\/p>\n\n\n\n<p>You can use curly  braces {} or brackets () when creating dictionaries.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-112.png\"><img loading=\"lazy\" decoding=\"async\" width=\"667\" height=\"180\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-112.png\" alt=\"\" class=\"wp-image-1063\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-112.png 667w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-112-300x81.png 300w\" sizes=\"(max-width: 667px) 100vw, 667px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-113.png\"><img loading=\"lazy\" decoding=\"async\" width=\"314\" height=\"154\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-113.png\" alt=\"\" class=\"wp-image-1064\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-113.png 314w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-113-300x147.png 300w\" sizes=\"(max-width: 314px) 100vw, 314px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>1.2 Accessing Dictionary Values<\/strong><\/p>\n\n\n\n<p>You can store the value from the key by stating which key so it stores teh value.<\/p>\n\n\n\n<p>I created the dictionary on the example above calle &#8216;devices&#8217; which I then wanted to store the IP address of &#8216;Router1&#8217;. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-114.png\"><img loading=\"lazy\" decoding=\"async\" width=\"282\" height=\"74\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-114.png\" alt=\"\" class=\"wp-image-1065\"\/><\/a><\/figure>\n\n\n\n<p>Anothe rexample is accessing the VLAN number which will then tell me what VLAN it belongs to.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-115.png\"><img loading=\"lazy\" decoding=\"async\" width=\"215\" height=\"66\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-115.png\" alt=\"\" class=\"wp-image-1066\"\/><\/a><\/figure>\n\n\n\n<p>The below example illustrates in calling out the Key from the dictionary and then printing the value. In the example below I will store the key pair for &#8216;Router&#8217; 3 and then printing out the IP address of it.<\/p>\n\n\n\n<p>I first create the dictionary below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-116.png\"><img loading=\"lazy\" decoding=\"async\" width=\"299\" height=\"109\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-116.png\" alt=\"\" class=\"wp-image-1067\"\/><\/a><\/figure>\n\n\n\n<p>I then store the Key pair first. and calling it &#8216;ip&#8217;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-118.png\"><img loading=\"lazy\" decoding=\"async\" width=\"269\" height=\"26\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-118.png\" alt=\"\" class=\"wp-image-1069\"\/><\/a><\/figure>\n\n\n\n<p>I then display the message and call the value pair by using f-string as one method below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-119.png\"><img loading=\"lazy\" decoding=\"async\" width=\"485\" height=\"46\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-119.png\" alt=\"\" class=\"wp-image-1070\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-119.png 485w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-119-300x28.png 300w\" sizes=\"(max-width: 485px) 100vw, 485px\" \/><\/a><\/figure>\n\n\n\n<p>Another method is to call the variable directly &#8216;ip&#8217;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-120.png\"><img loading=\"lazy\" decoding=\"async\" width=\"473\" height=\"49\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-120.png\" alt=\"\" class=\"wp-image-1071\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-120.png 473w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-120-300x31.png 300w\" sizes=\"(max-width: 473px) 100vw, 473px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>2. Modifying Dictionaries<\/strong><\/p>\n\n\n\n<p>You can modify or add key-value pairs.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-121.png\"><img loading=\"lazy\" decoding=\"async\" width=\"304\" height=\"108\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-121.png\" alt=\"\" class=\"wp-image-1072\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-121.png 304w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-121-300x107.png 300w\" sizes=\"(max-width: 304px) 100vw, 304px\" \/><\/a><\/figure>\n\n\n\n<p>I will now add a new key-value pair to the existing dictionary &#8216;device&#8217;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-122.png\"><img loading=\"lazy\" decoding=\"async\" width=\"857\" height=\"70\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-122.png\" alt=\"\" class=\"wp-image-1073\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-122.png 857w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-122-300x25.png 300w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-122-768x63.png 768w\" sizes=\"(max-width: 857px) 100vw, 857px\" \/><\/a><\/figure>\n\n\n\n<p>I can also modify the value pair and changing the ip from &#8216;4.4.4.4&#8217; to &#8216;9.9.9.9.&#8217;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-123.png\"><img loading=\"lazy\" decoding=\"async\" width=\"840\" height=\"73\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-123.png\" alt=\"\" class=\"wp-image-1074\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-123.png 840w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-123-300x26.png 300w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-123-768x67.png 768w\" sizes=\"(max-width: 840px) 100vw, 840px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>2.2 Removing Key-Value Pairs<\/strong><\/p>\n\n\n\n<p>I create a couple of dictionaries first to use as examples:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-121-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"304\" height=\"108\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-121-1.png\" alt=\"\" class=\"wp-image-1075\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-121-1.png 304w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-121-1-300x107.png 300w\" sizes=\"(max-width: 304px) 100vw, 304px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-125.png\"><img loading=\"lazy\" decoding=\"async\" width=\"242\" height=\"96\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-125.png\" alt=\"\" class=\"wp-image-1077\"\/><\/a><\/figure>\n\n\n\n<p>Using the same dictionary called &#8216;device&#8217; from above, I deleted &#8216;Router2&#8217; from the dictionary.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-124.png\"><img loading=\"lazy\" decoding=\"async\" width=\"253\" height=\"23\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-124.png\" alt=\"\" class=\"wp-image-1076\"\/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-127.png\"><img loading=\"lazy\" decoding=\"async\" width=\"446\" height=\"50\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-127.png\" alt=\"\" class=\"wp-image-1079\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-127.png 446w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-127-300x34.png 300w\" sizes=\"(max-width: 446px) 100vw, 446px\" \/><\/a><\/figure>\n\n\n\n<p>I also can use the pop() method. I create a new variable called &#8216;del_vlan&#8217; and then removed VLAN &#8217;20&#8217; from the &#8216;vlans&#8217; dictionary.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-126.png\"><img loading=\"lazy\" decoding=\"async\" width=\"289\" height=\"23\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-126.png\" alt=\"\" class=\"wp-image-1078\"\/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-128.png\"><img loading=\"lazy\" decoding=\"async\" width=\"148\" height=\"50\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-128.png\" alt=\"\" class=\"wp-image-1080\"\/><\/a><\/figure>\n\n\n\n<p>Below example<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>In pink is removing the key &#8216;Router1&#8217; and value &#8216; 1.1.1.1&#8217; pair from an existing dictionary called &#8216;device&#8217;<\/li>\n\n\n\n<li>In Blue, it is adding another key value pair into the existing dictionary.<\/li>\n\n\n\n<li>In Orange, it is editing the value from &#8216;3.3.3.3&#8217; to &#8216;33.33.33.33&#8217;.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-129.png\"><img loading=\"lazy\" decoding=\"async\" width=\"789\" height=\"155\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-129.png\" alt=\"\" class=\"wp-image-1081\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-129.png 789w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-129-300x59.png 300w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-129-768x151.png 768w\" sizes=\"(max-width: 789px) 100vw, 789px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>3. Iterating Through Dictionaries<\/strong><\/p>\n\n\n\n<p>Using the dictionary example for this section.<\/p>\n\n\n\n<p><span style=\"text-decoration: underline;\"><\/span><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-130.png\"><img loading=\"lazy\" decoding=\"async\" width=\"309\" height=\"109\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-130.png\" alt=\"\" class=\"wp-image-1085\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-130.png 309w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-130-300x106.png 300w\" sizes=\"(max-width: 309px) 100vw, 309px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>3.1 Iterating Through Keys<\/strong><\/p>\n\n\n\n<p>You can go through the dictionary in iteration, so one after another using &#8216;for&#8217; loops. Example below will call the key from the dictionary. And the dictionary key is router names.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-131.png\"><img loading=\"lazy\" decoding=\"async\" width=\"376\" height=\"132\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-131.png\" alt=\"\" class=\"wp-image-1086\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-131.png 376w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-131-300x105.png 300w\" sizes=\"(max-width: 376px) 100vw, 376px\" \/><\/a><\/figure>\n\n\n\n<p><div class=\"fix-z-index-when-showing-intro-js region-animation-complete\" id=\"flyout-region\"><div id=\"flyout-layout\" class=\"detail-flyout-layout\" data-tab=\"post-detail\" data-subtab=\"\"><div class=\"flyout-left scrollable-area\" id=\"flyout-main-content\"><div id=\"flyout-content-region\"><div><div class=\"post-detail-region\"><div id=\"post-detail-layout\"><div class=\"content-region\"><div id=\"detail-layout\" class=\"is-showing-coursework has-more-posts\"><div class=\"detail-layout-content-wrapper\"><div class=\"detail-layout-description mighty-wysiwyg-content mighty-max-content-width fr-view\"><h4><strong>3.2 Iterating Through Values<\/strong><\/h4><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/p>\n\n\n\n<p>Now instead of just calling out the keys in the dictonary, you can just print out the value instead which is the IP addresses.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-132.png\"><img loading=\"lazy\" decoding=\"async\" width=\"341\" height=\"138\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-132.png\" alt=\"\" class=\"wp-image-1087\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-132.png 341w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-132-300x121.png 300w\" sizes=\"(max-width: 341px) 100vw, 341px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>3.3 Iterating Through Key-Value Pairs<\/strong><\/p>\n\n\n\n<p>You can call out the key value pairs at the same time using .items().<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-133.png\"><img loading=\"lazy\" decoding=\"async\" width=\"503\" height=\"135\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-133.png\" alt=\"\" class=\"wp-image-1088\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-133.png 503w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-133-300x81.png 300w\" sizes=\"(max-width: 503px) 100vw, 503px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-134.png\"><img loading=\"lazy\" decoding=\"async\" width=\"538\" height=\"311\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-134.png\" alt=\"\" class=\"wp-image-1089\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-134.png 538w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-134-300x173.png 300w\" sizes=\"(max-width: 538px) 100vw, 538px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>4. Nested Dictionaries<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>4.1 Creating Nested Dictionaries<\/strong><\/p>\n\n\n\n<p>You can include more than one key pair by using nesting.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-135.png\"><img loading=\"lazy\" decoding=\"async\" width=\"345\" height=\"264\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-135.png\" alt=\"\" class=\"wp-image-1091\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-135.png 345w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-135-300x230.png 300w\" sizes=\"(max-width: 345px) 100vw, 345px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>4.2 Accessing Nested Dictionary Values<\/strong><\/p>\n\n\n\n<p>The below example will store the ip address of the router &#8216;1.1.1.1&#8217; and when you print it you can see the result.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-136.png\"><img loading=\"lazy\" decoding=\"async\" width=\"410\" height=\"64\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-136.png\" alt=\"\" class=\"wp-image-1093\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-136.png 410w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-136-300x47.png 300w\" sizes=\"(max-width: 410px) 100vw, 410px\" \/><\/a><\/figure>\n\n\n\n<p>Another example to find the OS version of the switch you can use a similar example:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-137.png\"><img loading=\"lazy\" decoding=\"async\" width=\"397\" height=\"70\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-137.png\" alt=\"\" class=\"wp-image-1094\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-137.png 397w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-137-300x53.png 300w\" sizes=\"(max-width: 397px) 100vw, 397px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-138.png\"><img loading=\"lazy\" decoding=\"async\" width=\"559\" height=\"51\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-138.png\" alt=\"\" class=\"wp-image-1095\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-138.png 559w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-138-300x27.png 300w\" sizes=\"(max-width: 559px) 100vw, 559px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>5. Dictionary Methods<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>5.1 <code>get()<\/code> Method<\/strong><\/p>\n\n\n\n<p>The get method is used to retreive specific key. The example below is looking for the &#8216;Router2&#8217; and if it is not there then print &#8216;not available&#8217;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-139.png\"><img loading=\"lazy\" decoding=\"async\" width=\"553\" height=\"71\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-139.png\" alt=\"\" class=\"wp-image-1096\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-139.png 553w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-139-300x39.png 300w\" sizes=\"(max-width: 553px) 100vw, 553px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>5.2 <code>keys()<\/code> and <code>values()<\/code> Methods<\/strong><\/p>\n\n\n\n<p>To print all the keys in a dictionary example below, will list your keys from the dictionary. &#8216;list&#8217; highlighted in blue is a keyword. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-140.png\"><img loading=\"lazy\" decoding=\"async\" width=\"378\" height=\"68\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-140.png\" alt=\"\" class=\"wp-image-1097\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-140.png 378w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-140-300x54.png 300w\" sizes=\"(max-width: 378px) 100vw, 378px\" \/><\/a><\/figure>\n\n\n\n<p>And to obtain the values from a dictionary:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-141.png\"><img loading=\"lazy\" decoding=\"async\" width=\"909\" height=\"93\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-141.png\" alt=\"\" class=\"wp-image-1098\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-141.png 909w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-141-300x31.png 300w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-141-768x79.png 768w\" sizes=\"(max-width: 909px) 100vw, 909px\" \/><\/a><\/figure>\n\n\n\n<p>Below is another example where if you use the get method and the item in the dictionary is not available then you can print an alternative message. Router 69 is not in the dictionary therefore it will print &#8216;Not Available&#8217;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-142.png\"><img loading=\"lazy\" decoding=\"async\" width=\"255\" height=\"111\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-142.png\" alt=\"\" class=\"wp-image-1099\"\/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-143.png\"><img loading=\"lazy\" decoding=\"async\" width=\"623\" height=\"67\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-143.png\" alt=\"\" class=\"wp-image-1100\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-143.png 623w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-143-300x32.png 300w\" sizes=\"(max-width: 623px) 100vw, 623px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>6. Combining Dictionaries<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>6.1 Using <code>update()<\/code> Method<\/strong><\/p>\n\n\n\n<p>You can add another dictionary you created into an existing dictionary using the update() method. Example below I have created a &#8216;devices&#8217; dictionary and added a new dictionary together called &#8216;devices2&#8217;. So now &#8216;devices&#8217; dictionary in Blue will include the key value pairs from &#8216;devices2&#8217; in Green.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-148.png\"><img loading=\"lazy\" decoding=\"async\" width=\"363\" height=\"196\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-148.png\" alt=\"\" class=\"wp-image-1107\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-148.png 363w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-148-300x162.png 300w\" sizes=\"(max-width: 363px) 100vw, 363px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-146.png\"><img loading=\"lazy\" decoding=\"async\" width=\"284\" height=\"32\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-146.png\" alt=\"\" class=\"wp-image-1105\"\/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-147.png\"><img loading=\"lazy\" decoding=\"async\" width=\"803\" height=\"76\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-147.png\" alt=\"\" class=\"wp-image-1106\" style=\"aspect-ratio:10.56578947368421;width:800px;height:auto\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-147.png 803w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-147-300x28.png 300w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-147-768x73.png 768w\" sizes=\"(max-width: 803px) 100vw, 803px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><div class=\"fix-z-index-when-showing-intro-js region-animation-complete\" id=\"flyout-region\"><div id=\"flyout-layout\" class=\"detail-flyout-layout\" data-tab=\"post-detail\" data-subtab=\"\"><div class=\"flyout-left scrollable-area\" id=\"flyout-main-content\"><div id=\"flyout-content-region\"><div><div class=\"post-detail-region\"><div id=\"post-detail-layout\"><div class=\"content-region\"><div id=\"detail-layout\" class=\"is-showing-coursework has-more-posts\"><div class=\"detail-layout-content-wrapper\"><div class=\"detail-layout-description mighty-wysiwyg-content mighty-max-content-width fr-view\"><h4><strong>6.2 Merging Dictionaries with <code>**<\/code> Operator<\/strong><\/h4><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/p>\n\n\n\n<p>You can merge two dictionaries together:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-149.png\"><img loading=\"lazy\" decoding=\"async\" width=\"941\" height=\"73\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-149.png\" alt=\"\" class=\"wp-image-1109\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-149.png 941w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-149-300x23.png 300w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-149-768x60.png 768w\" sizes=\"(max-width: 941px) 100vw, 941px\" \/><\/a><\/figure>\n\n\n\n<p>However, &#8216;devices&#8217; and &#8216;devices2&#8217; will still hold the existing key value pairs. You would need to call the &#8216;merge_dict&#8217; if you wanted the two dictionaries. <\/p>\n\n\n<ul class=\"wp-block-page-list\"><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=591\">Cisco Catalyst SD-WAN<\/a><\/li><li class=\"wp-block-pages-list__item menu-item-home\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/\">Jonny Hoang<\/a><\/li><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=837\">Network Automation<\/a><\/li><\/ul>\n\n\n<!--nextpage-->\n\n\n\n<h1 class=\"wp-block-heading has-large-font-size\">NETMIKO: Hands On Lab I<\/h1>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"isPasted\"><strong>&#8220;Accessing a Router and Executing Commands&#8221;<\/strong><\/h3>\n\n\n\n<p>In this lab exercise, I will write a script that will enter three commands to the router, before I do this I will need to ssh into this all done as part of the script.  Let&#8217;s take a look at the code and we can then decipher this and break it into chunks with explanation:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-150.png\"><img loading=\"lazy\" decoding=\"async\" width=\"666\" height=\"598\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-150.png\" alt=\"\" class=\"wp-image-1112\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-150.png 666w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-150-300x269.png 300w\" sizes=\"(max-width: 666px) 100vw, 666px\" \/><\/a><\/figure>\n\n\n\n<p>Line one below is basically calling the netmiko library module that was created by Kirk Byers. In the netmiko module, there are libraries that is created for network automation. And the SSH module is called ConnectHandler. It is designed to allow SSH connections for logging into a device. What I am asking is to use the Netmiko library (I previously installed already) and to use specifically the ssh module called Connecthandler.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-151.png\"><img loading=\"lazy\" decoding=\"async\" width=\"350\" height=\"18\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-151.png\" alt=\"\" class=\"wp-image-1113\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-151.png 350w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-151-300x15.png 300w\" sizes=\"(max-width: 350px) 100vw, 350px\" \/><\/a><\/figure>\n\n\n\n<p>Next step from line 3-10 I am creating a dictionary, the dictionary covers all the key variables needed for ConnectHandler to parse. Such as the IP, username and password etc.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-152.png\"><img loading=\"lazy\" decoding=\"async\" width=\"329\" height=\"153\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-152.png\" alt=\"\" class=\"wp-image-1114\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-152.png 329w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-152-300x140.png 300w\" sizes=\"(max-width: 329px) 100vw, 329px\" \/><\/a><\/figure>\n\n\n\n<p>Next step is to create a variable where you will then call the ssh into action and to call it from the dictionary I created above. So in essence I create a variable called &#8216;net_connect&#8217; and in that I will ssh using ConnectHandler and to pull the login details and IP from the dictionary. ** means to use the dictionary called &#8216;router&#8217;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-153.png\"><img loading=\"lazy\" decoding=\"async\" width=\"367\" height=\"22\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-153.png\" alt=\"\" class=\"wp-image-1115\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-153.png 367w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-153-300x18.png 300w\" sizes=\"(max-width: 367px) 100vw, 367px\" \/><\/a><\/figure>\n\n\n\n<p>Once SSH has been established, I will ask the script to go into enable mode using the ConnectHandler keyword\/function .enable(). I am still using &#8216;net_connect&#8217; as remember I created a variable which will ssh into the device called &#8216;net_connect&#8217;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-154.png\"><img loading=\"lazy\" decoding=\"async\" width=\"216\" height=\"20\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-154.png\" alt=\"\" class=\"wp-image-1116\"\/><\/a><\/figure>\n\n\n\n<p>Once we have logged in and gone into enable mode, we ask the script to send the command &#8216;show clock&#8217; on line 16 which is then stored into &#8216;output_clock&#8217;. Line 17 will then print the result &#8216;show clock&#8217; and display it. &#8216;\\n&#8217; means to put it in a new line. So the &#8216;output_clock&#8217; will be displayed in a new line for easier to read instead of straight after the message &#8216;show clock output&#8217;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-155.png\"><img loading=\"lazy\" decoding=\"async\" width=\"497\" height=\"39\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-155.png\" alt=\"\" class=\"wp-image-1117\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-155.png 497w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-155-300x24.png 300w\" sizes=\"(max-width: 497px) 100vw, 497px\" \/><\/a><\/figure>\n\n\n\n<p>The same is done for the command &#8216;show ip int brief&#8217;. With a new variable called &#8216;output_ip_interface&#8217;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-156.png\"><img loading=\"lazy\" decoding=\"async\" width=\"591\" height=\"39\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-156.png\" alt=\"\" class=\"wp-image-1118\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-156.png 591w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-156-300x20.png 300w\" sizes=\"(max-width: 591px) 100vw, 591px\" \/><\/a><\/figure>\n\n\n\n<p>The same is done for the command &#8216;show version&#8217;. With a new variable called &#8216;output_version&#8217;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-157.png\"><img loading=\"lazy\" decoding=\"async\" width=\"531\" height=\"38\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-157.png\" alt=\"\" class=\"wp-image-1119\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-157.png 531w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-157-300x21.png 300w\" sizes=\"(max-width: 531px) 100vw, 531px\" \/><\/a><\/figure>\n\n\n\n<p> And finally, once the commands have been sent and displayed, then disconnect the ssh session for security purposes.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-158.png\"><img loading=\"lazy\" decoding=\"async\" width=\"254\" height=\"20\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-158.png\" alt=\"\" class=\"wp-image-1120\"\/><\/a><\/figure>\n\n\n\n<p>End result is:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-159.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"600\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-159-1024x600.png\" alt=\"\" class=\"wp-image-1121\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-159-1024x600.png 1024w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-159-300x176.png 300w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-159-768x450.png 768w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-159.png 1155w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n<ul class=\"wp-block-page-list\"><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=591\">Cisco Catalyst SD-WAN<\/a><\/li><li class=\"wp-block-pages-list__item menu-item-home\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/\">Jonny Hoang<\/a><\/li><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=837\">Network Automation<\/a><\/li><\/ul>\n\n\n<!--nextpage-->\n\n\n\n<h1 class=\"wp-block-heading has-large-font-size\">NETMIKO: Hands On Lab II<\/h1>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"isPasted\">Using a For Loop to do the same thing!<\/h3>\n\n\n\n<p>In the first lab I wrote a script that enters commands and displays this. However the next iteration can be done in a cleaner method by using for loops. For loops is used if you want to go through each iteration until the loop is finished. This is the code below which I will break it down.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-160.png\"><img loading=\"lazy\" decoding=\"async\" width=\"709\" height=\"551\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-160.png\" alt=\"\" class=\"wp-image-1123\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-160.png 709w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-160-300x233.png 300w\" sizes=\"(max-width: 709px) 100vw, 709px\" \/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Next step is to create a variable where you will then call the ssh into action and to call it from the dictionary I created above. So in essence I create a variable called &#8216;net_connect&#8217; and in that I will ssh using ConnectHandler and to pull the login details and IP from the dictionary. ** means to use the dictionary called &#8216;router&#8217;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-153.png\"><img loading=\"lazy\" decoding=\"async\" width=\"367\" height=\"22\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-153.png\" alt=\"\" class=\"wp-image-1115\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-153.png 367w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-153-300x18.png 300w\" sizes=\"(max-width: 367px) 100vw, 367px\" \/><\/a><\/figure>\n\n\n\n<p>Once SSH has been established, I will ask the script to go into enable mode using the ConnectHandler keyword\/function .enable(). I am still using &#8216;net_connect&#8217; as remember I created a variable which will ssh into the device called &#8216;net_connect&#8217;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-154.png\"><img loading=\"lazy\" decoding=\"async\" width=\"216\" height=\"20\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-154.png\" alt=\"\" class=\"wp-image-1116\"\/><\/a><\/figure>\n\n\n\n<p>Instead of writing each show commands and displaying this, I create a List which contains the commands in one list. The list is called &#8216;commands&#8217;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-161.png\"><img loading=\"lazy\" decoding=\"async\" width=\"655\" height=\"58\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-161.png\" alt=\"\" class=\"wp-image-1124\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-161.png 655w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-161-300x27.png 300w\" sizes=\"(max-width: 655px) 100vw, 655px\" \/><\/a><\/figure>\n\n\n\n<p>I then create a for loop (line 20), the for loop is called &#8216;command&#8217; and I will then call the list i created above which contains the show commands called &#8216;commands&#8217;. I create a variable called &#8216;output&#8217; (line 21) and this basically asks the script to send the list (list of commands I created called &#8216;commands&#8217;) of commands one at a time and stored temporarily. Line 22 code will iterate the first item\/object in the list which is &#8216;show clock&#8217;, it then prints the message &#8216;Command : Show clock&#8217;  as an example. &#8216;\\n&#8217; means to put it in a new line. <\/p>\n\n\n\n<p>And lastly line 23 is then displaying the stored result from the router and display it on the screen.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-163.png\"><img loading=\"lazy\" decoding=\"async\" width=\"465\" height=\"82\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-163.png\" alt=\"\" class=\"wp-image-1126\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-163.png 465w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-163-300x53.png 300w\" sizes=\"(max-width: 465px) 100vw, 465px\" \/><\/a><\/figure>\n\n\n\n<p>And finally, once the commands have been sent and displayed, then disconnect the ssh session for security purposes.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-174.png\"><img loading=\"lazy\" decoding=\"async\" width=\"317\" height=\"19\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-174.png\" alt=\"\" class=\"wp-image-1139\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-174.png 317w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-174-300x18.png 300w\" sizes=\"(max-width: 317px) 100vw, 317px\" \/><\/a><\/figure>\n\n\n\n<p>End result:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-164.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"628\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-164-1024x628.png\" alt=\"\" class=\"wp-image-1127\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-164-1024x628.png 1024w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-164-300x184.png 300w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-164-768x471.png 768w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-164.png 1030w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-165.png\"><img loading=\"lazy\" decoding=\"async\" width=\"258\" height=\"74\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-165.png\" alt=\"\" class=\"wp-image-1128\"\/><\/a><\/figure>\n\n\n<ul class=\"wp-block-page-list\"><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=591\">Cisco Catalyst SD-WAN<\/a><\/li><li class=\"wp-block-pages-list__item menu-item-home\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/\">Jonny Hoang<\/a><\/li><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=837\">Network Automation<\/a><\/li><\/ul>\n\n\n<!--nextpage-->\n\n\n\n<h1 class=\"wp-block-heading has-large-font-size\">NETMIKO: Hands On Lab III<\/h1>\n\n\n\n<p>In this lab, we will create a nested for loop, so a for loop with another for loop nested inside to do the same job as previous two labs.<\/p>\n\n\n\n<p>The full code is below which I will break into sections for ease of understanding:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-166.png\"><img loading=\"lazy\" decoding=\"async\" width=\"602\" height=\"651\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-166.png\" alt=\"\" class=\"wp-image-1130\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-166.png 602w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-166-277x300.png 277w\" sizes=\"(max-width: 602px) 100vw, 602px\" \/><\/a><\/figure>\n\n\n\n<p>Line one below is basically calling the netmiko library module that was created by Kirk Byers. In the netmiko module, there are libraries that is created for network automation. And the SSH module is called ConnectHandler. It is designed to allow SSH connections for logging into a device. What I am asking is to use the Netmiko library (I previously installed already) and to use specifically the ssh module called Connecthandler.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-167.png\"><img loading=\"lazy\" decoding=\"async\" width=\"348\" height=\"24\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-167.png\" alt=\"\" class=\"wp-image-1132\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-167.png 348w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-167-300x21.png 300w\" sizes=\"(max-width: 348px) 100vw, 348px\" \/><\/a><\/figure>\n\n\n\n<p>Line 3 is where I create the list of routers called &#8216;router_ips&#8217;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-168.png\"><img loading=\"lazy\" decoding=\"async\" width=\"535\" height=\"20\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-168.png\" alt=\"\" class=\"wp-image-1133\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-168.png 535w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-168-300x11.png 300w\" sizes=\"(max-width: 535px) 100vw, 535px\" \/><\/a><\/figure>\n\n\n\n<p>Lines 5-10 is where I create another list for the commands that I want to execute once I ssh into the routers. The list of the commands I want to execute is called &#8216;commands&#8217;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-169.png\"><img loading=\"lazy\" decoding=\"async\" width=\"302\" height=\"112\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-169.png\" alt=\"\" class=\"wp-image-1134\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-169.png 302w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-169-300x111.png 300w\" sizes=\"(max-width: 302px) 100vw, 302px\" \/><\/a><\/figure>\n\n\n\n<p>Line 12 is where I create the first outer for loop, called &#8216;ip&#8217; which will call in the &#8216;router_ips&#8217; list and that contains the list of router IP addresses to ssh into. Line 13 will then display the message in a new line advising what router it is connecting to. Using a f-string allows you to call the for loop &#8216;ip&#8217; and that will display the list of IP addresses as it is then calling in &#8216;router_ips&#8217;. Everything below will all be nested now in the &#8216;ip&#8217; for loop.<\/p>\n\n\n\n<p>Line 15 to 22 is where it is nested, we create the dictionary that includes the details required for the module ConnectHandler. Notice in lin 17 I am calling the value &#8216;ip&#8217; which is the for loop &#8216;ip&#8217; and that in turn is calling in the &#8216;router_ips&#8217; list. So that is where it gets the IP addresses of the routers.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-170.png\"><img loading=\"lazy\" decoding=\"async\" width=\"390\" height=\"210\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-170.png\" alt=\"\" class=\"wp-image-1135\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-170.png 390w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-170-300x162.png 300w\" sizes=\"(max-width: 390px) 100vw, 390px\" \/><\/a><\/figure>\n\n\n\n<p>Line 23 is then creating the variable which is to ssh into the routers (remember the &#8216;router&#8217; is the dictionary with all the relevant information required to ssh into the devices). The ssh variable is called &#8216;net_connect&#8217; and is also nested in the &#8216;ip&#8217; for loop (outer for loop).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-171.png\"><img loading=\"lazy\" decoding=\"async\" width=\"415\" height=\"24\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-171.png\" alt=\"\" class=\"wp-image-1136\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-171.png 415w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-171-300x17.png 300w\" sizes=\"(max-width: 415px) 100vw, 415px\" \/><\/a><\/figure>\n\n\n\n<p>Line 25 will execute the enable mode within the router using keyword\/function .enable().<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-172.png\"><img loading=\"lazy\" decoding=\"async\" width=\"281\" height=\"19\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-172.png\" alt=\"\" class=\"wp-image-1137\"\/><\/a><\/figure>\n\n\n\n<p>Line 27 &#8211; 30 is the inner nested for loop. Line 27 begins with the nested for loop called &#8216;command&#8217; and will call in the list of commands created called &#8216;commands&#8217;.<\/p>\n\n\n\n<p>Line 28 will then connect to the routers one by one and send the commands, remember &#8216;command&#8217; is the inner for loop, which is then calling in &#8216;commands&#8217; which has the list of commands I want to execute. The command output is stored in &#8216;output&#8217; using the .send_command keyword. &#8216;net_connect&#8217; remember is the variable used to ssh initially into the router using ConnectHandler.<\/p>\n\n\n\n<p>Line 29 will then display the message &#8216;Command:&#8217; and it will print the list of commands followed by the IPs of the router.<\/p>\n\n\n\n<p>Line 30 will then print out the result stored in &#8216;output&#8217; onto the screen.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-173.png\"><img loading=\"lazy\" decoding=\"async\" width=\"477\" height=\"76\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-173.png\" alt=\"\" class=\"wp-image-1138\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-173.png 477w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-173-300x48.png 300w\" sizes=\"(max-width: 477px) 100vw, 477px\" \/><\/a><\/figure>\n\n\n\n<p> Line 32 &#8211; once the commands have been sent and displayed, then disconnect the ssh session for security purposes. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-174.png\"><img loading=\"lazy\" decoding=\"async\" width=\"317\" height=\"19\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-174.png\" alt=\"\" class=\"wp-image-1139\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-174.png 317w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-174-300x18.png 300w\" sizes=\"(max-width: 317px) 100vw, 317px\" \/><\/a><\/figure>\n\n\n\n<p>And finally, to complete the script, line 34 just displays a message to say &#8216;Disconnected from&#8217; the routers IP addresses. the {ip} is being called as an f-string and &#8216;ip&#8217; is called from the outer for loop (&#8216;for ip in router_ips&#8217;). <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-175.png\"><img loading=\"lazy\" decoding=\"async\" width=\"367\" height=\"23\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-175.png\" alt=\"\" class=\"wp-image-1140\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-175.png 367w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-175-300x19.png 300w\" sizes=\"(max-width: 367px) 100vw, 367px\" \/><\/a><\/figure>\n\n\n\n<p>Result below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-176.png\"><img loading=\"lazy\" decoding=\"async\" width=\"634\" height=\"379\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-176.png\" alt=\"\" class=\"wp-image-1141\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-176.png 634w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-176-300x179.png 300w\" sizes=\"(max-width: 634px) 100vw, 634px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-177.png\"><img loading=\"lazy\" decoding=\"async\" width=\"628\" height=\"344\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-177.png\" alt=\"\" class=\"wp-image-1142\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-177.png 628w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-177-300x164.png 300w\" sizes=\"(max-width: 628px) 100vw, 628px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-178.png\"><img loading=\"lazy\" decoding=\"async\" width=\"573\" height=\"351\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-178.png\" alt=\"\" class=\"wp-image-1143\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-178.png 573w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-178-300x184.png 300w\" sizes=\"(max-width: 573px) 100vw, 573px\" \/><\/a><\/figure>\n\n\n<ul class=\"wp-block-page-list\"><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=591\">Cisco Catalyst SD-WAN<\/a><\/li><li class=\"wp-block-pages-list__item menu-item-home\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/\">Jonny Hoang<\/a><\/li><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=837\">Network Automation<\/a><\/li><\/ul>\n\n\n<!--nextpage-->\n\n\n\n<p class=\"has-large-font-size\">Learning to Use Sets and Tuples<\/p>\n\n\n\n<p>A Set is a unordered collection of items, this is mutable which means you can change the values in the set however duplication is NOT allowed. So in a set you cannot have router 1 twice.<\/p>\n\n\n\n<p>Whereas in a Tuple it is immutable which means you can NOT change the values once it is done.  However you can have duplication.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>1.1 Creating and Using Sets<\/strong><\/p>\n\n\n\n<p>Int he example below, I have created a Set (now it used the curly braces{} just like dictionary, however there is no key value pairs so that is how you can tell it is a set not a dictionary). I have repeated the objects twice, but when i print the set it removes the duplicates.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-179.png\"><img loading=\"lazy\" decoding=\"async\" width=\"588\" height=\"68\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-179.png\" alt=\"\" class=\"wp-image-1150\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-179.png 588w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-179-300x35.png 300w\" sizes=\"(max-width: 588px) 100vw, 588px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>1.2 Adding and Removing Elements in a Set<\/strong><\/p>\n\n\n\n<p>Using the .add() to add a new item to the Set. And also using .remove() to remove from a Set.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-180.png\"><img loading=\"lazy\" decoding=\"async\" width=\"585\" height=\"181\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-180.png\" alt=\"\" class=\"wp-image-1151\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-180.png 585w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-180-300x93.png 300w\" sizes=\"(max-width: 585px) 100vw, 585px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>1.3 Set Operations in Network Automation<\/strong><\/p>\n\n\n\n<p>The example below is allowing you to compare the the same items in different sets. So for example you can have a set of configured devices and another set which is active. Items could be configured and active which will be in the same two sets.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-181.png\"><img loading=\"lazy\" decoding=\"async\" width=\"619\" height=\"135\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-181.png\" alt=\"\" class=\"wp-image-1152\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-181.png 619w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-181-300x65.png 300w\" sizes=\"(max-width: 619px) 100vw, 619px\" \/><\/a><\/figure>\n\n\n\n<p>You can also differentiate with two different sets.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-182.png\"><img loading=\"lazy\" decoding=\"async\" width=\"591\" height=\"45\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-182.png\" alt=\"\" class=\"wp-image-1153\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-182.png 591w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-182-300x23.png 300w\" sizes=\"(max-width: 591px) 100vw, 591px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-183.png\"><img loading=\"lazy\" decoding=\"async\" width=\"490\" height=\"65\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-183.png\" alt=\"\" class=\"wp-image-1154\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-183.png 490w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-183-300x40.png 300w\" sizes=\"(max-width: 490px) 100vw, 490px\" \/><\/a><\/figure>\n\n\n\n<p>Another example below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-185.png\"><img loading=\"lazy\" decoding=\"async\" width=\"456\" height=\"48\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-185.png\" alt=\"\" class=\"wp-image-1156\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-185.png 456w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-185-300x32.png 300w\" sizes=\"(max-width: 456px) 100vw, 456px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-188.png\"><img loading=\"lazy\" decoding=\"async\" width=\"578\" height=\"67\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-188.png\" alt=\"\" class=\"wp-image-1159\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-188.png 578w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-188-300x35.png 300w\" sizes=\"(max-width: 578px) 100vw, 578px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>2. Understanding Tuples in Python<\/strong><\/p>\n\n\n\n<p>Rememeber Tuples are immutable which means you cannot change the values in the Tuple but you can have the same items in the same Tuple.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>2.1 Creating and Using Tuples<\/strong><\/p>\n\n\n\n<p>Below example illustrates how to create a Tuple, I have included two different methods you can use to print the Tuple, using f-string and without.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-189.png\"><img loading=\"lazy\" decoding=\"async\" width=\"565\" height=\"120\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-189.png\" alt=\"\" class=\"wp-image-1162\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-189.png 565w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-189-300x64.png 300w\" sizes=\"(max-width: 565px) 100vw, 565px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>2.2 Accessing Elements in a Tuple<\/strong><\/p>\n\n\n\n<p>You can print the items\/objects in the Tuple by calling the index. Remember the first object always starts with 0.<\/p>\n\n\n\n<p>Example below, I created 2 variables and calline the tuple but with the index number. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-190.png\"><img loading=\"lazy\" decoding=\"async\" width=\"472\" height=\"201\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-190.png\" alt=\"\" class=\"wp-image-1163\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-190.png 472w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-190-300x128.png 300w\" sizes=\"(max-width: 472px) 100vw, 472px\" \/><\/a><\/figure>\n\n\n\n<p>Another Example<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-192.png\"><img loading=\"lazy\" decoding=\"async\" width=\"804\" height=\"141\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-192.png\" alt=\"\" class=\"wp-image-1165\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-192.png 804w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-192-300x53.png 300w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-192-768x135.png 768w\" sizes=\"(max-width: 804px) 100vw, 804px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>2.3 Tuples as Keys in Dictionaries<\/strong><\/p>\n\n\n\n<p>You can add Tuples into a Dictionary, and then call the Tuples. <\/p>\n\n\n\n<p>In the example below, I created two Tuples within a dictionary. Dictionary is highlighted in Orange and Tuples are in Yellow. I then create a variable that calle the Tuple in Green. I create new variable called &#8216;policy&#8217; in Pink which will then call the dictionary and Tuple in Green, if the  Tuple in the dictionary is not the same as the variable &#8216;pair&#8217; in Green then print &#8216;No Policy defined&#8217; in Blue.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-191.png\"><img loading=\"lazy\" decoding=\"async\" width=\"522\" height=\"193\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-191.png\" alt=\"\" class=\"wp-image-1164\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-191.png 522w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-191-300x111.png 300w\" sizes=\"(max-width: 522px) 100vw, 522px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>3.1 Managing VLAN Assignments with Sets and Tuples<\/strong><\/p>\n\n\n\n<p>In this example, we have existing vlans in a dictionary, we then create a Tuple with a new vlan and relevant information. A for loop basically explaining if the new vlan index 0 in Orange already exists in the existing vlan dictionary then print the vlan already is configured. <\/p>\n\n\n\n<p>Else statement to say if it isnt in the dictionary then, to print the new vlan details specifically the indexes that is in the Tuple.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-193.png\"><img loading=\"lazy\" decoding=\"async\" width=\"790\" height=\"208\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-193.png\" alt=\"\" class=\"wp-image-1166\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-193.png 790w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-193-300x79.png 300w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-193-768x202.png 768w\" sizes=\"(max-width: 790px) 100vw, 790px\" \/><\/a><\/figure>\n\n\n\n<p>Another example:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-194.png\"><img loading=\"lazy\" decoding=\"async\" width=\"756\" height=\"206\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-194.png\" alt=\"\" class=\"wp-image-1167\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-194.png 756w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/09\/image-194-300x82.png 300w\" sizes=\"(max-width: 756px) 100vw, 756px\" \/><\/a><\/figure>\n\n\n<ul class=\"wp-block-page-list\"><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=591\">Cisco Catalyst SD-WAN<\/a><\/li><li class=\"wp-block-pages-list__item menu-item-home\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/\">Jonny Hoang<\/a><\/li><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=837\">Network Automation<\/a><\/li><\/ul>\n\n\n<!--nextpage-->\n\n\n\n<p class=\"has-large-font-size\">Understanding the Principle of Containment<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>1. The <code>in<\/code> and <code>not in<\/code> Operators<\/strong><\/p>\n\n\n\n<p>You can use the &#8216;in&#8217; or &#8216;not in&#8217; to check a specific parameters. <\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>1.1 Using <code>in<\/code> with Lists<\/strong><\/p>\n\n\n\n<p>Example below I create a list called &#8216;devices&#8217; and then I create a variable &#8216;check&#8217; which has &#8216;Router1&#8217; in the variable.<br>I then create a &#8216;if&#8217; statement to check if &#8216;check&#8217; (Router1) is in the list called &#8216;devices&#8217; and if it is then print Router1 is in the network else Router1 is not in the network.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image.png\"><img loading=\"lazy\" decoding=\"async\" width=\"505\" height=\"195\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image.png\" alt=\"\" class=\"wp-image-1186\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image.png 505w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-300x116.png 300w\" sizes=\"(max-width: 505px) 100vw, 505px\" \/><\/a><\/figure>\n\n\n\n<p>Another example below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"567\" height=\"200\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-2.png\" alt=\"\" class=\"wp-image-1188\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-2.png 567w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-2-300x106.png 300w\" sizes=\"(max-width: 567px) 100vw, 567px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>1.2 Using <code>not in<\/code> with Lists<\/strong><\/p>\n\n\n\n<p>This time you can have the &#8216;not in&#8217; statement. The below example is basically checking if &#8216;Router69&#8217; is not in the list called &#8216;devices&#8217; then print a statement to say Router69 is not in the network.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"482\" height=\"178\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-1.png\" alt=\"\" class=\"wp-image-1187\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-1.png 482w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-1-300x111.png 300w\" sizes=\"(max-width: 482px) 100vw, 482px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>2. Using <code>in<\/code> and <code>not in<\/code> with Dictionaries<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>2.1 Checking Keys in a Dictionary<\/strong><\/p>\n\n\n\n<p>The example below is the same as the above example 1.1 using lists. but this time we check the key in a disctionary.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-3.png\"><img loading=\"lazy\" decoding=\"async\" width=\"478\" height=\"281\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-3.png\" alt=\"\" class=\"wp-image-1189\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-3.png 478w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-3-300x176.png 300w\" sizes=\"(max-width: 478px) 100vw, 478px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>2.2 Checking Values in a Dictionary<\/strong><\/p>\n\n\n\n<p>To check the value in a dictionary, you use the &#8216;.values()&#8217; hihglighted in PINK.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-4.png\"><img loading=\"lazy\" decoding=\"async\" width=\"476\" height=\"283\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-4.png\" alt=\"\" class=\"wp-image-1190\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-4.png 476w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-4-300x178.png 300w\" sizes=\"(max-width: 476px) 100vw, 476px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>3. Using <code>in<\/code> and <code>not in<\/code> with Sets<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>3.1 Checking Membership in a Set<\/strong><\/p>\n\n\n\n<p>The example below is showing as LIST instead of SET. It should be a set beginning with { and end with }. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-7.png\"><img loading=\"lazy\" decoding=\"async\" width=\"495\" height=\"220\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-7.png\" alt=\"\" class=\"wp-image-1193\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-7.png 495w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-7-300x133.png 300w\" sizes=\"(max-width: 495px) 100vw, 495px\" \/><\/a><\/figure>\n\n\n\n<p><strong>3.1 Checking Membership not in a Set<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-8.png\"><img loading=\"lazy\" decoding=\"async\" width=\"488\" height=\"224\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-8.png\" alt=\"\" class=\"wp-image-1194\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-8.png 488w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-8-300x138.png 300w\" sizes=\"(max-width: 488px) 100vw, 488px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>4. Practical Use Cases in Network Automation<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>4.1 Verifying Commands Before Execution<\/strong><\/p>\n\n\n\n<p>Example below has a list of commands in the list, if the command &#8216;show cdp nei&#8217; is not on the list then print it is not allowed to be executed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-9.png\"><img loading=\"lazy\" decoding=\"async\" width=\"469\" height=\"219\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-9.png\" alt=\"\" class=\"wp-image-1195\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-9.png 469w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-9-300x140.png 300w\" sizes=\"(max-width: 469px) 100vw, 469px\" \/><\/a><\/figure>\n\n\n\n<p>Another example:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-10.png\"><img loading=\"lazy\" decoding=\"async\" width=\"464\" height=\"218\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-10.png\" alt=\"\" class=\"wp-image-1196\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-10.png 464w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-10-300x141.png 300w\" sizes=\"(max-width: 464px) 100vw, 464px\" \/><\/a><\/figure>\n\n\n<ul class=\"wp-block-page-list\"><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=591\">Cisco Catalyst SD-WAN<\/a><\/li><li class=\"wp-block-pages-list__item menu-item-home\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/\">Jonny Hoang<\/a><\/li><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=837\">Network Automation<\/a><\/li><\/ul>\n\n\n<!--nextpage-->\n\n\n\n<p class=\"has-large-font-size\">Learning to Use\/Create Python Functions<\/p>\n\n\n\n<p>A function is a block of code which you can recycle, this is useful as it saves time.<\/p>\n\n\n\n<p>A basic example of a function is below:<\/p>\n\n\n\n<p>def = is defining the function<\/p>\n\n\n\n<p>status() = is the name of the function, () as it is empty there is no parameters within the function.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-11.png\"><img loading=\"lazy\" decoding=\"async\" width=\"347\" height=\"113\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-11.png\" alt=\"\" class=\"wp-image-1199\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-11.png 347w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-11-300x98.png 300w\" sizes=\"(max-width: 347px) 100vw, 347px\" \/><\/a><\/figure>\n\n\n\n<p>The example below starts with :<\/p>\n\n\n\n<p>import subprocess &#8211; it is a library module where you can use code to push commands regardless of OS you are using. So if I wanted to ping an IP I could use the subprocess module to allow me to ping.<\/p>\n\n\n\n<p>I have created a function called &#8216;ping&#8217; and in the function I have a parameter called &#8216;ip_address&#8217; which will be used to call in the IP addresses called &#8216;device1&#8217; and &#8216;device2&#8217;.<\/p>\n\n\n\n<p>I create a variable called &#8216;response&#8217; and within the variable\/function the &#8216;subprocess.run&#8217; is used to execute the pings. So I am asking the script to ping 1 packet hence the &#8216;-c 1&#8217;. <\/p>\n\n\n\n<p><code>stdout=subprocess.PIPE<\/code> captures the output of the <code>ping<\/code> command (though it is not used in this code).<\/p>\n\n\n\n<p>Once the ping is done, it will then store the result in the &#8216;response&#8217; variable.<\/p>\n\n\n\n<p>&#8216;return&#8217; is a keyword in Python which is used in functions to send the value or multiple values to the function. So to return the function it is asking for the &#8216;response&#8217; function and &#8216;returncode&#8217; if it is 0 it means success. In a nutshell if you use &#8216;subprocess.run&#8217; then a return code is needed. and if it is not 0 it is false.<\/p>\n\n\n\n<p>The IP addresses being used to ping is 1.1.1.1 and 12.2.2.2. As the &#8216;ping&#8217; function (ip_address) is what the IP addresses of 1.1.1.1 and 12.2.2.2 is it calling.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-12.png\"><img loading=\"lazy\" decoding=\"async\" width=\"901\" height=\"160\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-12.png\" alt=\"\" class=\"wp-image-1200\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-12.png 901w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-12-300x53.png 300w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-12-768x136.png 768w\" sizes=\"(max-width: 901px) 100vw, 901px\" \/><\/a><\/figure>\n\n\n<ul class=\"wp-block-page-list\"><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=591\">Cisco Catalyst SD-WAN<\/a><\/li><li class=\"wp-block-pages-list__item menu-item-home\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/\">Jonny Hoang<\/a><\/li><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=837\">Network Automation<\/a><\/li><\/ul>\n\n\n<!--nextpage-->\n\n\n\n<p class=\"has-large-font-size\">Creating 5 functions that leverage the IPaddress Package<\/p>\n\n\n<ul class=\"wp-block-page-list\"><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=591\">Cisco Catalyst SD-WAN<\/a><\/li><li class=\"wp-block-pages-list__item menu-item-home\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/\">Jonny Hoang<\/a><\/li><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=837\">Network Automation<\/a><\/li><\/ul>\n\n\n<!--nextpage-->\n\n\n\n<p class=\"has-large-font-size\">Using f-strings<\/p>\n\n\n\n<p>F-Strings are useful when you are calling in a variable whilst printing something.<\/p>\n\n\n\n<p>Example below is when you can call in the f-string. I have added a couple of example where you can create a variable which calls in the f-string or just printing the variable with the f-string.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-13.png\"><img loading=\"lazy\" decoding=\"async\" width=\"667\" height=\"175\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-13.png\" alt=\"\" class=\"wp-image-1205\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-13.png 667w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-13-300x79.png 300w\" sizes=\"(max-width: 667px) 100vw, 667px\" \/><\/a><\/figure>\n\n\n<ul class=\"wp-block-page-list\"><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=591\">Cisco Catalyst SD-WAN<\/a><\/li><li class=\"wp-block-pages-list__item menu-item-home\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/\">Jonny Hoang<\/a><\/li><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=837\">Network Automation<\/a><\/li><\/ul>\n\n\n<!--nextpage-->\n\n\n\n<p class=\"has-large-font-size\">Using the IPAddress Library (with Lab)<\/p>\n\n\n\n<p>Using the example by importing the &#8216;ipaddress&#8217; module from Python which allows you to check whether a list of router IPs are valid or not. To simplify the code as the firs iteration I have created a list then a for loop to check the list of IP addresses.The example code is below and I will explain line by line before moving to using Functions.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-14.png\"><img loading=\"lazy\" decoding=\"async\" width=\"662\" height=\"347\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-14.png\" alt=\"\" class=\"wp-image-1210\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-14.png 662w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-14-300x157.png 300w\" sizes=\"(max-width: 662px) 100vw, 662px\" \/><\/a><\/figure>\n\n\n\n<p>The first line of code is to import the ipaddress library module, it is designed to handle IP address related tasks. In this instance, we are using the library to check if a list of IPs are valid or not.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-17.png\"><img loading=\"lazy\" decoding=\"async\" width=\"192\" height=\"21\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-17.png\" alt=\"\" class=\"wp-image-1213\"\/><\/a><\/figure>\n\n\n\n<p>From line 3 &#8211; 11 we create a list, and the list includes IP addresses and words.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-15.png\"><img loading=\"lazy\" decoding=\"async\" width=\"237\" height=\"171\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-15.png\" alt=\"\" class=\"wp-image-1211\"\/><\/a><\/figure>\n\n\n\n<p>Line 13, I create a for loop called &#8216;index&#8217; this could be calle anything, I then create a index numbering by calling the &#8216;enumerate()&#8217; function and called it &#8216;list&#8217;. In the enumberate function I call in the list I created in line 3 called &#8216;ip&#8217;.<\/p>\n\n\n\n<p>Line 14 begins witht he &#8216;try&#8217; which tests a block of code to see if there are any errors. <\/p>\n\n\n\n<p>Line 15 I create a variable called &#8216;ip_obj&#8217; and that then calls in the module &#8216;ipaddress&#8217; from line 1 and then the &#8216;IPv4Address&#8217; object and calls in the &#8216;list&#8217; which is tied to the enumerate list of ips. The object from the IP address.IPv4Address&#8217; purpose is to check the list whether they are valid IP addresses or not. If so, then line 16 prints to state it is a valid IP. <\/p>\n\n\n\n<p>Line 17 is how to handle the try code, so if the code has no errors then use the keyword &#8216;ValueError&#8217; (keyword in the ipaddress library module) which means it is not a valid IP, if so then to print it is not a valid IP in line 18.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-16.png\"><img loading=\"lazy\" decoding=\"async\" width=\"662\" height=\"117\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-16.png\" alt=\"\" class=\"wp-image-1212\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-16.png 662w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-16-300x53.png 300w\" sizes=\"(max-width: 662px) 100vw, 662px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-18.png\"><img loading=\"lazy\" decoding=\"async\" width=\"456\" height=\"136\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-18.png\" alt=\"\" class=\"wp-image-1214\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-18.png 456w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-18-300x89.png 300w\" sizes=\"(max-width: 456px) 100vw, 456px\" \/><\/a><\/figure>\n\n\n\n<p>Another example is to create a function which means you can re-use the code to save time.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-20.png\"><img loading=\"lazy\" decoding=\"async\" width=\"656\" height=\"402\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-20.png\" alt=\"\" class=\"wp-image-1216\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-20.png 656w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-20-300x184.png 300w\" sizes=\"(max-width: 656px) 100vw, 656px\" \/><\/a><\/figure>\n\n\n\n<p>Using the example by importing the &#8216;ipaddress&#8217; module from Python which allows you to check whether a list of router IPs are valid or not. To simplify the code as the firs iteration I have created a list then a for loop to check the list of IP addresses.The example code is below and I will explain line by line before moving to using Functions.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-17.png\"><img loading=\"lazy\" decoding=\"async\" width=\"192\" height=\"21\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-17.png\" alt=\"\" class=\"wp-image-1213\"\/><\/a><\/figure>\n\n\n\n<p>Line 3, I create a function called &#8216;check_ip()&#8217;.<\/p>\n\n\n\n<p>The same for loop is then used in the function. <\/p>\n\n\n\n<p>Line 4, I create a for loop called &#8216;index&#8217; this could be calle anything, I then create a index numbering by calling the &#8216;enumerate()&#8217; function and called it &#8216;list&#8217;. In the enumberate function I call in the list I created in line 11 called &#8216;ip&#8217;.<\/p>\n\n\n\n<p>Line 5 begins with the &#8216;try&#8217; which tests a block of code to see if there are any errors. <\/p>\n\n\n\n<p>Line 6 I create a variable called &#8216;ip_obj&#8217; and that then calls in the module &#8216;ipaddress&#8217; from line 1 and then the &#8216;IPv4Address&#8217; object and calls in the &#8216;list&#8217; which is tied to the enumerate list of ips. The object from the IP address.IPv4Address&#8217; purpose is to check the list whether they are valid IP addresses or not. If so, then line 7 prints to state it is a valid IP. <\/p>\n\n\n\n<p>Line 8 is how to handle the try code, so if the code has no errors then use the keyword &#8216;ValueError&#8217; (keyword in the ipaddress library module) which means it is not a valid IP, if so then to print it is not a valid IP in line 9.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-21.png\"><img loading=\"lazy\" decoding=\"async\" width=\"651\" height=\"131\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-21.png\" alt=\"\" class=\"wp-image-1217\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-21.png 651w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-21-300x60.png 300w\" sizes=\"(max-width: 651px) 100vw, 651px\" \/><\/a><\/figure>\n\n\n\n<p>From line 11-19 we create a list, and the list includes IP addresses and words.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-22.png\"><img loading=\"lazy\" decoding=\"async\" width=\"251\" height=\"173\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-22.png\" alt=\"\" class=\"wp-image-1218\"\/><\/a><\/figure>\n\n\n\n<p>Finally, we call the function so it begins to test the code out. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-23.png\"><img loading=\"lazy\" decoding=\"async\" width=\"137\" height=\"21\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-23.png\" alt=\"\" class=\"wp-image-1219\"\/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-24.png\"><img loading=\"lazy\" decoding=\"async\" width=\"507\" height=\"142\" src=\"http:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-24.png\" alt=\"\" class=\"wp-image-1220\" srcset=\"https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-24.png 507w, https:\/\/jaychou.co.uk\/wp-content\/uploads\/2024\/10\/image-24-300x84.png 300w\" sizes=\"(max-width: 507px) 100vw, 507px\" \/><\/a><\/figure>\n\n\n<ul class=\"wp-block-page-list\"><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=591\">Cisco Catalyst SD-WAN<\/a><\/li><li class=\"wp-block-pages-list__item menu-item-home\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/\">Jonny Hoang<\/a><\/li><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=837\">Network Automation<\/a><\/li><\/ul>\n\n\n<!--nextpage-->\n\n\n\n<p class=\"has-large-font-size\">Using Input and Getpass to protect Passwords<\/p>\n\n\n\n<p><\/p>\n\n\n<ul class=\"wp-block-page-list\"><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=591\">Cisco Catalyst SD-WAN<\/a><\/li><li class=\"wp-block-pages-list__item menu-item-home\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/\">Jonny Hoang<\/a><\/li><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=837\">Network Automation<\/a><\/li><\/ul>\n\n\n<!--nextpage-->\n\n\n\n<p class=\"has-large-font-size\">Using sys.argv and Netmiko to Execute Show Commands on a Cisco IOS XE Device<\/p>\n\n\n<ul class=\"wp-block-page-list\"><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=591\">Cisco Catalyst SD-WAN<\/a><\/li><li class=\"wp-block-pages-list__item menu-item-home\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/\">Jonny Hoang<\/a><\/li><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=837\">Network Automation<\/a><\/li><\/ul>\n\n\n<!--nextpage-->\n\n\n\n<p class=\"has-large-font-size\">Using NETCONF with Cisco IOS XE Devices for Network Automation<\/p>\n\n\n<ul class=\"wp-block-page-list\"><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=591\">Cisco Catalyst SD-WAN<\/a><\/li><li class=\"wp-block-pages-list__item menu-item-home\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/\">Jonny Hoang<\/a><\/li><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=837\">Network Automation<\/a><\/li><\/ul>\n\n\n<!--nextpage-->\n\n\n\n<p class=\"has-large-font-size\">Using RESTCONF with Cisco IOS XE Devices for Network Automation<\/p>\n\n\n<ul class=\"wp-block-page-list\"><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=591\">Cisco Catalyst SD-WAN<\/a><\/li><li class=\"wp-block-pages-list__item menu-item-home\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/\">Jonny Hoang<\/a><\/li><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=837\">Network Automation<\/a><\/li><\/ul>\n\n\n<!--nextpage-->\n\n\n\n<p class=\"has-large-font-size\">API Automation vs. Conventional CLI Interaction in Cisco Network Resources<\/p>\n\n\n<ul class=\"wp-block-page-list\"><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=591\">Cisco Catalyst SD-WAN<\/a><\/li><li class=\"wp-block-pages-list__item menu-item-home\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/\">Jonny Hoang<\/a><\/li><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=837\">Network Automation<\/a><\/li><\/ul>\n\n\n<!--nextpage-->\n\n\n\n<p class=\"has-large-font-size\">API Automation vs. NETCONF and RESTCONF in Network Management<\/p>\n\n\n<ul class=\"wp-block-page-list\"><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=591\">Cisco Catalyst SD-WAN<\/a><\/li><li class=\"wp-block-pages-list__item menu-item-home\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/\">Jonny Hoang<\/a><\/li><li class=\"wp-block-pages-list__item\"><a class=\"wp-block-pages-list__item__link\" href=\"https:\/\/jaychou.co.uk\/?page_id=837\">Network Automation<\/a><\/li><\/ul>\n\n\n<!--nextpage-->\n","protected":false},"excerpt":{"rendered":"<p>Section 1: Python Fundamentals Understanding Data Types Learning to Use Strings Learning to Use Numbers Using if, elif &amp; else Statements Learning to Use Booleans Learning to use While and For Loops Learning to Use Lists Learning to Use Dictionaries NETMIKO: Hands On Lab I &#8211; &#8220;Accessing a Router and Executing Commands&#8220; NETMIKO: Hands on &hellip; <a href=\"https:\/\/jaychou.co.uk\/?page_id=837\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Network Automation<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":611,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-837","page","type-page","status-publish","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"https:\/\/jaychou.co.uk\/index.php?rest_route=\/wp\/v2\/pages\/837"}],"collection":[{"href":"https:\/\/jaychou.co.uk\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/jaychou.co.uk\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/jaychou.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jaychou.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=837"}],"version-history":[{"count":93,"href":"https:\/\/jaychou.co.uk\/index.php?rest_route=\/wp\/v2\/pages\/837\/revisions"}],"predecessor-version":[{"id":1223,"href":"https:\/\/jaychou.co.uk\/index.php?rest_route=\/wp\/v2\/pages\/837\/revisions\/1223"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jaychou.co.uk\/index.php?rest_route=\/wp\/v2\/media\/611"}],"wp:attachment":[{"href":"https:\/\/jaychou.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=837"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}