Package ZenModel :: Module zenmib :: Class DependencyMap
[hide private]
[frames] | no frames]

Class DependencyMap

source code

A dependency is a reference to another part of the MIB tree. All MIB definitions start from the base of the tree (ie .1). Generally dependencies are from MIB definitions external to the MIB under inspection.

Instance Methods [hide private]
 
__init__(self) source code
 
add(self, filename, name, dependencies)
Add a dependency to the dependency tree if it's not already there.
source code
string
getName(self, filename)
Given a filename, return the name of the MIB tree defined in it.
source code
tuple of ( name, dependency object)
getDependencies(self, name)
Given a name of the MIB tree, return the filename that it's from and its dependencies.
source code
Method Details [hide private]

add(self, filename, name, dependencies)

source code 
Add a dependency to the dependency tree if it's not already there.
Parameters:
  • filename (string) - name of MIB file to import
  • name (string) - name of MIB
  • dependencies (dependency object) - dependency

getName(self, filename)

source code 
Given a filename, return the name of the MIB tree defined in it. Makes the assumption that there's only one MIB tree per file.
Parameters:
  • filename (string) - MIB filename
Returns: string
MIB name

To Do: to allow for multiple MIBs in a file, should return a list

getDependencies(self, name)

source code 
Given a name of the MIB tree, return the filename that it's from and its dependencies.
Parameters:
  • name (string) - name of MIB
Returns: tuple of ( name, dependency object)
dependency tree