You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+40-41Lines changed: 40 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,108 +1,107 @@
1
-
# NX-OS-SCP-Bulk-Transfer
1
+
# netmiko-scp-multi-thread-upload
2
2
3
-
A Simple Python script to upload and verify (checksum) files to multiple network devices in parallel, supported by Netmiko
3
+
This script leverages Netmiko's features to secure copy (SCP) a single file to multiple remote network devices in parallel.
4
+
It checks if the file already exists on the remote devices and compares the checksums. If the files are identical, it does not upload it.
4
5
5
-
6
-
## Use Case Description
7
-
8
-
If you have a large number of NX-OS devices and need to upload a file, for example a new version of NX-OS, to all these devices without the help of an external tool like Cisco DCNM or similar, it can be very time-consuming. This script takes care of everything.
9
6
10
-
This script uses the strength and functionality of Netmiko to copy, in parallel, a single file to multiple network devices.
7
+
## Use Case Description
11
8
12
-
Supported devices are:
9
+
If you have a large number of network devices and need to upload a big file, like a new OS or similar, to all these devices, it can be very time-consuming. This script takes care of everything.
The file system is the default defined into Netmiko. Please refer to the Netmiko documentation here[https://pynet.twb-tech.com/blog/automation/netmiko-scp.html]
35
+
36
+
The file system used for each OS type is the one defined by default in Netmiko. Please refer to the Netmiko documentation here: https://pynet.twb-tech.com/blog/automation/netmiko-scp.html
37
+
44
38
45
39
## Usage
46
40
47
-
Add the file name as an argument to the script.
48
-
Then, the script will check if the file exists, read the list of hosts and ask you for your NX-OS credentials in order to upload the file.
41
+
Add the filename as an argument to the script.
42
+
43
+
The script will also check if the file exists, then read the list of hosts, vendor type and ask you for your credentials.
44
+
49
45
It will ask you for a confirmation before starting the upload.
46
+
50
47
To save time and bandwidth, if the file already exists it will be not overwritten.
51
48
52
-
usage: nxos-scp-upload.py filename
49
+
**Usage: nxos-scp-upload.py filename**
53
50
54
51
positional arguments:
55
52
filename The file to upload
56
53
57
54
Example where the file does not exists on the first host, but exists on the second:
A great way to make your repo easy for others to use is to provide a link to a [DevNet Sandbox](https://developer.cisco.com/site/sandbox/) that provides a network or other resources required to use this code. In addition to identifying an appropriate sandbox, be sure to provide instructions and any configuration necessary to run your code with the sandbox.
105
103
104
+
106
105
## How to test the software
107
106
108
107
--- To be completed ---
@@ -114,9 +113,9 @@ If the repo is instrumented with a continuous testing framework, that is even be
114
113
115
114
## Known issues
116
115
117
-
The MD5 check part need to be completed, it's not working yet.
116
+
The 'file exists already' value is always True, even if it does not exists in reality. The upload is done anyway, this is only an output error, but the script is working at 100%
118
117
119
-
This script uses multi-threads and may be improved by using multi-processing.
118
+
This script uses multi-threads, it may be improved by using multi-processing.
120
119
The defined threads are 4 for now, I have to test what is the optimal number of threads depending on the devices, computer, network bandwidth and latency, etc.
0 commit comments