Now it's time to perform the final verification. Before opening up the SSH connections to our Arista switches. We shall verify if the text file containing the commands that we want to be sent out to the devices exists on the local system or not. Without getting too much into any more details, the process is the same as before, we are asking the user for input, namely the path and name of the necessary file. As soon as the user enters the string, we reference it using the CMD file variable. And then using the same ease file method from within the oil path module.
We check if this is a valid file or not. If it is, then we print out a message and move on to the rest of the code. Otherwise, we're telling the user to try again and quit the program. Nothing special here. You can find the code for this verification process immediately after this video ends. Next It's time to get our hands dirty and established the SSH sessions to our restart virtual machines.
So, I will see you in the next lecture.