Skip to content

Commit 29e9d5f

Browse files
Update README.md
1 parent 9633210 commit 29e9d5f

File tree

1 file changed

+32
-14
lines changed

1 file changed

+32
-14
lines changed

README.md

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,29 +66,47 @@ For the Complete Scripts and Video maps please access the folder "`01_Paramiko_S
6666
```
6767
***
6868
## Directory : [02_Configure_Device_Using_CSV](https://github.com/network-evolution/Python_for_Network_Engineers/tree/main/02_Configure_Device_Using_CSV)
69-
This directory contains Scripts which explains how to read Device IP Address and configuration lines from CSV file and configure respective device.
69+
This directory contains Scripts which explains how to read Device IP Address and configuration lines from CSV file and configure respective devices using Python.
7070

7171
* Sample CSV FIle Used for Configuring the Device :
7272

7373
![CSV1](https://user-images.githubusercontent.com/70020386/114660759-7d79b600-9d13-11eb-8e53-6cd2807341c8.png)
74+
75+
76+
* The above CSV file will create a Dictionary in below format
7477
```
75-
session.set_missing_host_key_policy(paramiko.AutoAddPolicy())
76-
session.load_host_keys('/home/evolve/.ssh/known_hosts')
77-
session.set_missing_host_key_policy(paramiko.WarningPolicy())
78+
conf_dict={'192.168.0.50': ['terminal len 0',
79+
'config t',
80+
'int gi1',
81+
'no shut',
82+
'exit',
83+
'exit',
84+
'show ip int brie',
85+
'show run int gi1'],
86+
'192.168.0.51': ['terminal len 0',
87+
'config t',
88+
'int lo0',
89+
'ip add 10.0.0.1 255.255.255.0',
90+
'int lo1',
91+
'ip add 11.0.0.1 255.255.255.0',
92+
'do show run int loopback0',
93+
'do show run int loopback1'],
94+
'192.168.0.53': ['terminal len 0', 'config t', 'int gi3', 'no shut'],
95+
'csr1.test.lab': ['terminal len 0',
96+
'config t',
97+
'int gi2',
98+
'no shut',
99+
'ip address 2.2.2.2 255.255.255.0',
100+
'exit',
101+
'exit',
102+
'show ip int brie',
103+
'show run int gi2']}
78104
```
79105

80-
* SSH Keybased Authentication Using Paramiko:
81-
* Paramiko SSH exec_command Example
82-
* Paramiko invoke_shell example
83-
* SSH Password Based Authentication
106+
*
84107

85108
### List of Scripts in the Directory
86-
```
87-
01_ssh_host_key_policy.py
88-
02.1_ssh_key_cisco_exec_command.py
89-
02.2_ssh_key_cisco_invoke_shell.py
90-
02.3_ssh_key_cisco_invoke_shell_fn.py
91-
```
109+
- 01_config_in_row.csv : How to read Content from CSV file in row format : [Script Demonstration](https://www.youtube.com/watch?v=3XoVPJkHMFU&list=PLOocymQm7YWYpP_Qkju89vN8BykhvWO5U)
92110

93111
[Click here for Complete Paramiko Scripts Tutorial Playlist In YouTube :01_Paramiko_Sample_Scripts](https://www.youtube.com/watch?v=A075aWJMAeM&list=PLOocymQm7YWYc73phqzbZ1S3ANrVVpUFN)
94112

0 commit comments

Comments
 (0)