This repository has been archived by the owner on Aug 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Machine.py
78 lines (60 loc) · 1.92 KB
/
Machine.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
class Machine:
ip = ""
mac = ""
fqdn = ""
manufact = ""
model = ""
serialNo = ""
coreCount = -1
coreModel = ""
totalMemory = -1
rack = -1
position = -1
units = -1
def __init__ (self,ip):
self.ip = ip
def displayIp(self):
print("\nIP Address: " + self.ip)
def displayMac(self):
print("\nMAC Address: " + self.mac)
def displayFqdn(self):
print("\nFQDN: " + self.fqdn)
def displayManufact(self):
print("\nManufacturer: " + self.manufact)
def displayModel(self):
print("\nModel: " + self.model)
def displaySerialNo(self):
print("\nSerial Number: " + self.serialNo)
def displayCoreCount(self):
print("\nCore Count: " + str(self.coreCount))
def displayCoreModel(self):
print("\nSerial Number: " + self.coreModel)
def displayTotalMemory(self):
print("\nTotal System Memory: " + str(self.totalMemory) + "GB")
def displayRack(self):
print("\nServer Rack ID: " + self.rack)
def displayPosition(self):
print("\nPosition of Machine in Rack: " + self.position)
def displayUnits(self):
print("\nHeight of Machine in Units: " + self.units)
def displayAll(self):
print("\nCurrent Machine:")
print("===========================")
self.displayIp()
self.displayMac()
self.displayFqdn()
self.displayManufact()
self.displayModel()
self.displaySerialNo()
print("==========================")
print("\nCore & Memory Information:")
print("==========================")
self.displayCoreModel()
self.displayCoreCount()
self.displayTotalMemory()
print("==========================")
print("\nPhysical Information:")
print("==========================")
self.displayRack()
self.displayPosition()
self.displayUnits()