Home | Trees | Index | Help |
|
---|
Package AccessGrid :: Package Platform :: Package win32 :: Module Config :: Class SystemConfig |
|
SystemConfig
--+
|
SystemConfig
Method Summary | |
---|---|
__init__(self)
| |
This method pokes the windows registry to enable or disable an application in the firewall config. | |
Enumerate the interfaces present on a windows box. | |
Find the definition of varname in the registry. | |
Retrieve the amount of free space on the file system the path is housed on. | |
Get our IP address. | |
If the system has a proxy server defined for use, return its address. | |
Return a list of the resources available on the system | |
Get the path to the system temp directory. | |
Get the name of the user | |
instance()
(Static method) | |
This method grabs a snapshot of relevent system information to report it. | |
This updates all windows with registry changes to the HKCU\Environment key. | |
Inherited from SystemConfig | |
| |
| |
Retrieve the SNTP time and compare this clock against it. | |
Retrieve the local hostname. | |
Retrieve the time from the given time server, with a timeout. |
Instance Variable Summary | |
---|---|
string | tempDir : the system temp directory. |
Class Variable Summary | |
---|---|
SystemConfig |
theSystemConfigInstance = <AccessGrid.Platform.win32.Con...
|
Instance Method Details |
---|
AppFirewallConfig(self, path, enableFlag)This method pokes the windows registry to enable or disable an application in the firewall config. |
EnumerateInterfaces(self)Enumerate the interfaces present on a windows box. Run ipconfig /all |
FindRegistryEnvironmentVariable(self, varname)Find the definition of varname in the registry. Returns the tuple (global_value, user_value). We can use this to determine if the user has set an environment variable at the commandline if it's causing problems. |
GetFileSystemFreeSpace(self, path)Retrieve the amount of free space on the file system the path is housed on. |
GetLocalIPAddress(self)Get our IP address. We use the heuristic that the address we want to advertise is the one that corresponds to the active default route. If there isn't a default route, pick the lowest-metric interface from the routing table. If we don't have anything there, return 127.0.0.1 |
GetProxySettings(self)If the system has a proxy server defined for use, return its address. The return value is actually a list of tuples (server address, enabled). There are at least two places to look for these values. WinHttp defines a proxy at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections\WinHttpSettings Unfortunately it stores its value as a binary string; it's meant to be accessed via the WinHttpGetDefaultProxyConfiguration call or by the proxycfg.exe program. For now, we'll just use the IE setting: IE defines a proxy at: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings The key ProxyServer has the name of the proxy, and ProxyEnable is nonzero if it is enabled for use. If there are different proxies for different protocols, the ProxyServer key will look like this: ftp=ftpp:2345;gopher=gopherp:3456;http=yips:8080;https=securep:1234;socks=socksp:4567 If it is set to use the same server for all protocols, it will look like this: yips:8080 |
GetResources(self)Return a list of the resources available on the system |
GetTempDir(self)Get the path to the system temp directory.
|
GetUsername(self)Get the name of the user
|
PerformanceSnapshot(self)This method grabs a snapshot of relevent system information to report it. This helps track the effect of the AG Toolkit on the system. |
SendSettingChange(self)This updates all windows with registry changes to the HKCU\Environment key. |
Instance Variable Details |
---|
tempDirthe system temp directory.
|
Class Variable Details |
---|
theSystemConfigInstance
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Thu Apr 14 16:39:31 2005 | http://epydoc.sf.net |