-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparent_device.py
More file actions
45 lines (24 loc) · 1.19 KB
/
parent_device.py
File metadata and controls
45 lines (24 loc) · 1.19 KB
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
44
45
'''
Created on Apr 22, 2018
This class is for handling Parent device info under Network tab in Speed
@author: sp977u
'''
class ParentDeviceInfoNetworkTab :
def __init__(self):
self.sucfilecontent = []
self.hostname_written = "No"
def write_parent_dev_info(self,logpath, ipadd,filecontent):
Final = " "
rowswritten = 0
self.sucfilecontent = filecontent
try :
for line in self.sucfilecontent:
if 'Parent IP :' in line :
Final = line.replace("Parent IP :",'').strip()
break
return Final
except Exception as ex:
print("There is something wrong in write Parent device method under parent device module ")
print(ex)
return " "
#=======================================================================================================