-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathReset.py
43 lines (36 loc) · 1.37 KB
/
Reset.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
class Reset():
def doReset(self, ob):
# HOSTs reset IPs#
for n in range(0,12):
ob.host[n].setIP('ip-not-found')
ob.host[n].setMascara('255.255.0.0')
ob.host[n].setLigado(False)
ob.nic_host[n].setLigado(False)
ob.nic_host[n].setTDados(False)
ob.host[n].resetPing()
# SWITCHs reset#
ob.switch[0].setLigado(False)
for n in range(0,5):
ob.nic_switch[n].setLigado(False)
ob.nic_switch[n].setTDados(False)
ob.switch[1].setLigado(False)
for n in range(5,10):
ob.nic_switch[n].setLigado(False)
ob.nic_switch[n].setTDados(False)
ob.switch[2].setLigado(False)
for n in range(10,15):
ob.nic_switch[n].setLigado(False)
ob.nic_switch[n].setTDados(False)
# ROUTERs #
ob.router[0].setLigado(False)
for n in range(0,4):
ob.nic_router[n].setLigado(False)
ob.nic_router[n].setTDados(False)
ob.router[1].setLigado(False)
for n in range(4,8):
ob.nic_router[n].setLigado(False)
ob.nic_router[n].setTDados(False)
ob.router[2].setLigado(False)
for n in range(8,12):
ob.nic_router[n].setLigado(False)
ob.nic_router[n].setTDados(False)