Package Products :: Package ZenStatus :: Module NetworkModel :: Class NetworkModel |
[hide private]
[frames] | no frames]

# Class NetworkModel

source code

    object --+
             |
            NetworkModel

Instance Methods | [hide private]
__init__(self, version=4, loadCache=True) | source code
_newTopology(self) Create a blank new topology | source code
array |
getRoute(self, endpoint) Given an endpoint name, get the route to it. | source code
showRoute(self, endpoint) Print the route from the collector to the endpoint device IP. | source code
search(self, key, criteria=None, regex=None) Search the topology for any matches to the key. | source code
resolveName(self, deviceName) Given a device name, resolve to an IP address using only the information in the topology. | source code
saveTopology(self) Checkpoint the topology to disk to preserve changes even in the event of crashes etc. | source code
_getTopoCacheName(self) | source code
reloadCache(self, topologyCache=None) Restore any previously saved topology or create a new one. | source code
_saveTopology(self, topologyCache=None) Allow the topology to be periodically saved. | source code
_stripUncacheableMetaData(self) The topology map carries a direct reference to tasks (ie pointers), which can't be persisted. | source code
disconnectedNodes(self) Determine the list of devices to traceroute and update the topology map. | source code
boolean |
updateTopology(self, route) Canonicalize the route, removing any cloud entries, and update the topology (if necessary). | source code
makeSpanningTree(self) Clear the existing structure and create a spanning tree. | source code
_canonicalizeRoute(self, route) Given a route, reduce it to a route that can exist in the topology | source code
string |
_cloudify(self, hop) If the hop is a part of the cloud, then return the cloud name. | source code
_addCloud(self, cloud) If the cloud already exists, do nothing. | source code
removeDevice(self, device) Cleanly remove the device from the topology. | source code
subgraphPingNodes(self) Prune out nodes from the topology which we don't monitor. | source code

Method Details | [hide private]

### __init__(self, version=4, loadCache=True) (Constructor) | source code
Overrides: object.__init__ (inherited documentation)

### getRoute(self, endpoint) | source code
Given an endpoint name, get the route to it. If the endpoint doesn't exist, return an empty route. Parameters: `endpoint` (string) - name of the device Returns: array list of devices from the collector to the endpoint

### showRoute(self, endpoint) | source code
Print the route from the collector to the endpoint device IP. Parameters: `device` (string) - name of the device

### search(self, key, criteria=None, regex=None) | source code
Search the topology for any matches to the key. Parameters: `key` (string) `criteria` (string or callable)

### updateTopology(self, route) | source code
Canonicalize the route, removing any cloud entries, and update the topology (if necessary). Returns: boolean was the topology updated or not?

### makeSpanningTree(self) | source code
Clear the existing structure and create a spanning tree. This is a dangerous operation.

### _cloudify(self, hop) | source code
If the hop is a part of the cloud, then return the cloud name. Else return the hop. If the cloud does not exist in the topology, creates it. Parameters: `hop` (string) - name or IP address Returns: string the hop (if not a part of a cloud) or the cloud

### _addCloud(self, cloud) | source code
If the cloud already exists, do nothing. Else, create the cloud and initialize it. Parameters: `cloud` (string) - name of the cloud

### removeDevice(self, device) | source code
Cleanly remove the device from the topology. Parameters: `device` (string) - name of the device to check

### subgraphPingNodes(self) | source code
Prune out nodes from the topology which we don't monitor. This means that if we model the route x -> y -> z but we only ping nodes x + z, that if x and z are down that we associate the cause of z being down as x, rather than being independent.