WEBVTT

1
00:00.000 --> 00:03.860
Alrighty friends, let's talk about the answers. So the first question we have

2
00:03.860 --> 00:04.480
been asked

3
00:04.480 --> 00:09.420
that many of the devices in our network are very old, can we still automate

4
00:09.420 --> 00:09.920
them?

5
00:09.920 --> 00:13.920
Well, as I hope we've learned within this particular skill, we are not limited

6
00:13.920 --> 00:14.720
by having

7
00:14.720 --> 00:19.180
old devices. In fact, so long as these old, dusty devices can be managed

8
00:19.180 --> 00:20.960
remotely via SSH,

9
00:20.960 --> 00:25.670
then you can utilize particular tools such as NetMico to basically log in

10
00:25.670 --> 00:27.360
remotely and run all the

11
00:27.360 --> 00:30.990
commands that you need just in a programmatic manner. So the first answer to
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

11
00:27.360 --> 00:30.990
commands that you need just in a programmatic manner. So the first answer to

12
00:30.990 --> 00:31.840
this question is

13
00:31.840 --> 00:36.000
they resounding yes, don't let all devices put you off, automation is still

14
00:36.000 --> 00:37.040
possible. Okay,

15
00:37.040 --> 00:41.470
next one, we have over 100 devices in our network. Is this going to present a

16
00:41.470 --> 00:42.720
problem? Can we connect

17
00:42.720 --> 00:46.750
to them all? Well, is this going to present a problem? Certainly not. 100

18
00:46.750 --> 00:48.160
devices, not a big issue

19
00:48.160 --> 00:52.580
at all. Now how can we connect to the mobile? Technically what you could do is

20
00:52.580 --> 00:53.600
you could write the

21
00:53.600 --> 00:58.600
connection details for every single one of your 100 devices, every single 10

22
00:58.600 --> 00:59.680
year rate a script,

23
00:59.680 --> 01:03.800
and just bait the details directly into the script. Now you may be thinking
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

23
00:59.680 --> 01:03.800
and just bait the details directly into the script. Now you may be thinking

24
01:03.800 --> 01:05.120
this is not a good idea.

25
01:05.120 --> 01:09.600
And if that is your intuition, then you certainly would be correct. Remember

26
01:09.600 --> 01:10.800
what we did in this

27
01:10.800 --> 01:15.140
particular skill. Instead, we simply wrote the connection details for all of

28
01:15.140 --> 01:16.080
our devices, which in

29
01:16.080 --> 01:19.660
this case here would be 100 a little bit more than four, but nevertheless we

30
01:19.660 --> 01:20.880
could write them into

31
01:20.880 --> 01:24.920
a YAML file and we only need to write that information once and then in the

32
01:24.920 --> 01:26.480
future for every single time

33
01:26.480 --> 01:31.480
you want to run a script, we can just add in very simple logic to read in the
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

33
01:26.480 --> 01:31.480
you want to run a script, we can just add in very simple logic to read in the

34
01:31.480 --> 01:32.880
information from this

35
01:32.880 --> 01:37.490
particular file, utilizing say, for example, the PI YAML library. And after

36
01:37.490 --> 01:38.800
that, what can we do? We can

37
01:38.800 --> 01:44.470
utilize things such as loops to iterate through each element within that object

38
01:44.470 --> 01:45.040
and then connect

39
01:45.040 --> 01:50.100
your devices sequentially one by one by one. I will say for posterity, if you

40
01:50.100 --> 01:50.960
get a little bit more

41
01:50.960 --> 01:55.070
familiar with Python, you can actually do some cool things such as threading,

42
01:55.070 --> 01:56.240
which is essentially

43
01:56.240 --> 02:00.090
going to allow you to connect to all 100 devices at the same time as opposed to
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

43
01:56.240 --> 02:00.090
going to allow you to connect to all 100 devices at the same time as opposed to

44
02:00.090 --> 02:01.600
one by one by one by one

45
02:01.600 --> 02:05.760
in a regular Python loop. But forget about that for now, that's way beyond what

46
02:05.760 --> 02:06.720
we're talking about.

47
02:06.720 --> 02:11.280
Quite simply, if you're just beginning to automate with only 100 devices, a

48
02:11.280 --> 02:12.640
Python loop is probably

49
02:12.640 --> 02:16.110
a perfectly reasonable option, albeit perhaps not the most efficient solution

50
02:16.110 --> 02:17.920
but never mind that, okay?

51
02:17.920 --> 02:21.720
If you suggested a Python loop, then in my book you still get all the points.

52
02:21.720 --> 02:23.120
Okay, so the next part,

53
02:23.120 --> 02:27.000
they ask, will we be able to make configuration changes or just run show

54
02:27.000 --> 02:28.320
commands? Well, in the case of

55
02:28.320 --> 02:33.520
NetMico, we know we can use the send command methods, which is going to allow
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

55
02:28.320 --> 02:33.520
NetMico, we know we can use the send command methods, which is going to allow

56
02:33.520 --> 02:34.800
us to send show commands

57
02:34.800 --> 02:38.320
to our devices. Okay, so that sounds pretty good, but what about making

58
02:38.320 --> 02:39.760
configuration changes? Well,

59
02:39.760 --> 02:44.860
as we know, NetMico also has another method known as the send config set method

60
02:44.860 --> 02:45.840
, and this is going to

61
02:45.840 --> 02:50.230
allow us to send actual configuration. So what we could do is we could have our

62
02:50.230 --> 02:51.520
configurations in some

63
02:51.520 --> 02:55.250
type of text file, and then we can read in those configurations using the open

64
02:55.250 --> 02:56.240
function and then

65
02:56.240 --> 03:00.290
break it down line by line by utilizing the read lines methods, and then we can
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

65
02:56.240 --> 03:00.290
break it down line by line by utilizing the read lines methods, and then we can

66
03:00.290 --> 03:01.600
take this data and

67
03:01.600 --> 03:06.200
pass into NetMico's send config set to make the actual configuration changes.

68
03:06.200 --> 03:06.800
So the last one,

69
03:06.800 --> 03:10.720
the big boss has heard about network testing. They're asking is this possible?

70
03:10.720 --> 03:12.320
How can we implement this?

71
03:12.320 --> 03:16.210
Well, similar to what we just saw before we know NetMico can send show commands

72
03:16.210 --> 03:17.520
, but in the case of

73
03:17.520 --> 03:21.810
our old devices, this is going to return just regular string data, but what we

74
03:21.810 --> 03:22.720
can do is we can

75
03:22.720 --> 03:28.200
utilize tools such as text, FSN with NetMico, and this can basically transform

76
03:28.200 --> 03:30.000
our regular CLI text
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

77
03:30.000 --> 03:34.960
into structured data, whereby we can parse it and then implement Pythonic logic

78
03:34.960 --> 03:35.760
to effectively

79
03:35.760 --> 03:40.240
conduct particular tests. You know, is our NTP server matching what we expect?

80
03:40.240 --> 03:41.360
Are our OSPF

81
03:41.360 --> 03:45.220
neighbors in the full state that type of thing? Really, when it comes to

82
03:45.220 --> 03:46.080
network testing,

83
03:46.080 --> 03:50.060
as long as you have your data coming back to you as structured data, then the

84
03:50.060 --> 03:50.960
only real limits are

85
03:50.960 --> 03:54.800
your imagination, anything you can think of, you can pretty much implement. So

86
03:54.800 --> 03:56.240
friends, that is us

87
03:56.240 --> 04:00.240
for our validation challenge on writing Python scripts for network automation.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

87
03:56.240 --> 04:00.240
for our validation challenge on writing Python scripts for network automation.

88
04:00.240 --> 04:00.960
I hope it's been

89
04:00.960 --> 04:04.380
in the form of 'to for you', and I'd like to thank you for viewing.
