From: Michael Tremer Date: Mon, 27 Dec 2010 17:06:21 +0000 (+0100) Subject: Add network information to profile. X-Git-Tag: v2.0.0~5^2 X-Git-Url: http://git.ipfire.org/?p=oddments%2Ffireinfo.git;a=commitdiff_plain;h=859893199fc300e067a35cc14d735f43a44cf62b Add network information to profile. --- diff --git a/fireinfo/system.py b/fireinfo/system.py index 862aace..d711ba0 100644 --- a/fireinfo/system.py +++ b/fireinfo/system.py @@ -29,6 +29,7 @@ import _fireinfo import cpu import device import hypervisor +import network PROFILE_VERSION = 0 @@ -129,6 +130,13 @@ class System(object): "count" : self.cpu.count } + p["network"] = { + "green" : self.network.has_green(), + "blue" : self.network.has_blue(), + "orange" : self.network.has_orange(), + "red" : self.network.has_red(), + } + # Only append hypervisor information if we are virtualized. if self.virtual: p["hypervisor"] = { @@ -379,7 +387,13 @@ class System(object): """ return self.hypervisor.virtual - + @property + def network(self): + """ + Reference to the network class. + """ + return network.Network() + if __name__ == "__main__": s=System()