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

Class IpInterface

source code

                                                       object --+            
                                                                |            
                                                Lockable.Lockable --+        
                                                                    |        
                                      DeviceComponent.DeviceComponent --+    
                                                                        |    
                                                   object --+           |    
                                                            |           |    
                                    ZenModelBase.ZenModelBase --+       |    
                                                                |       |    
Products.ZenRelations.RelationshipManager.RelationshipManager --+       |    
                                                                |       |    
                                      ExtensionClass.Base --+   |       |    
                                                            |   |       |    
                                       OFS.History.Historical --+       |    
                                                                |       |    
                                                   object --+   |       |    
                                                            |   |       |    
                                          ZenPacker.ZenPacker --+       |    
                                                                |       |    
                                            ZenModelRM.ZenModelRM --+   |    
                                                                    |   |    
                                  DeviceResultInt.DeviceResultInt --+   |    
                                                                    |   |    
                                                       object --+   |   |    
                                                                |   |   |    
                                              EventView.EventView --+   |    
                                                                    |   |    
                                                       object --+   |   |    
                                                                |   |   |    
                                                  RRDView.RRDView --+   |    
                                                                    |   |    
                                          ManagedEntity.ManagedEntity --+    
                                                                        |    
                                                  OSComponent.OSComponent --+
                                                                            |
                                Products.ZenModel.Linkable.Layer2Linkable --+
                                                                            |
                                                                           IpInterface

IpInterface object

Instance Methods [hide private]
 
__init__(self, id, title=None)
Init OSComponent and set _ipAddresses to an empty list.
source code
 
viewName(self)
Use the unmagled interface name for display
source code
 
primarySortKey(self)
Use the unmagled interface name for display
source code
 
name(self)
Use the unmagled interface name for display
source code
 
_setPropValue(self, id, value)
Override from PerpertyManager to handle checks and ip creation
source code
 
index_object(self)
Override the default so that links are indexed.
source code
 
unindex_object(self)
Override the default so that links are unindexed.
source code
 
manage_editProperties(self, REQUEST)
Override from propertiyManager so we can trap errors
source code
 
__getattr__(self, name)
Allow access to ipAddresses via the ips attribute
source code
 
_prepIp(self, ip, netmask=24)
Split ips in the format 1.1.1.1/24 into ip and netmask.
source code
 
addIpAddress(self, ip, netmask=24)
Add an ip to the ipaddresses relationship on this interface.
source code
 
addLocalIpAddress(self, ip, netmask=24)
Add a locally stored ip.
source code
 
clearIps(self, ips)
If no IPs are sent remove all in the relation
source code
 
setIpAddresses(self, ips)
Set a list of ipaddresses in the form 1.1.1.1/24 on to this interface.
source code
 
removeIpAddress(self, ip)
Remove an ipaddress from this interface.
source code
 
getIp(self)
Return the first ip for this interface in the form: 1.1.1.1.
source code
 
getIpSortKey(self)
Return the ipaddress as a 32bit integter for sorting purposes.
source code
 
getIpAddress(self)
Return the first ipaddress with its netmask ie: 1.1.1.1/24.
source code
 
getIpAddressObj(self)
Return the first real ipaddress object or None if none are found.
source code
 
getIpAddressObjs(self)
Return a list of the ip objects on this interface.
source code
 
getIpAddresses(self)
Return list of ip addresses as strings in the form 1.1.1.1/24.
source code
 
getNetwork(self)
Return the network for the first ip on this interface.
source code
 
getNetworkName(self)
Return the network name for the first ip on this interface.
source code
 
getNetworkLink(self)
Return the network link for the first ip on this interface.
source code
 
getNetworkLinks(self)
Return a list of network links for each ip in this interface.
source code
 
getInterfaceName(self)
Return the name of this interface.
source code
 
getInterfaceMacaddress(self)
Return the mac address of this interface.
source code
 
getRRDTemplateName(self)
Return the interface type as the target type name.
source code
 
getRRDTemplates(self)
Return a list containing the appropriate RRDTemplate for this IpInterface.
source code
 
snmpIgnore(self)
Ignore interface that are operationally down.
source code
 
niceSpeed(self)
Return a string that expresses self.speed in reasonable units.
source code
 
manage_beforeDelete(self, item, container)
Unindex this interface after it is deleted.
source code
 
deviceId(self)
The device id, for indexing purposes.
source code
 
interfaceId(self)
The interface id, for indexing purposes.
source code
 
lanId(self)
pass
source code

Inherited from OSComponent.OSComponent: device, getIconPath, getPrettyLink, isUserCreated, manage_deleteComponent, manage_updateComponent, setUserCreateFlag

Inherited from DeviceComponent.DeviceComponent: filterAutomaticCreation, getAqProperty, getClassObject, getCollectors, getInstDescription, getManageIp, getNagiosTemplate, getParentDeviceName, getParentDeviceUrl, getRRDContextData, getStatus, getStatusString, hostname, manage_afterAdd, manage_afterClone, monitored, setAqProperty

Inherited from Lockable.Lockable: getNextLockableParent, isLockedFromDeletion, isLockedFromUpdates, isUnlocked, lockFromDeletion, lockFromUpdates, lockStatus, lockWarning, sendEventWhenBlocked, setSendEventWhenBlockedFlag, unlock, unsetSendEventWhenBlockedFlag

Inherited from ZenModelRM.ZenModelRM: changePythonClass, creator, editableDeviceList, findChild, getCreatedTimeString, getDmdKey, getModificationTimeString, getSubObjects, getTreeItems, getZenRootNode, reindex_all, rename, zmanage_addProperty, zmanage_delObjects, zmanage_delProperties, zmanage_editProperties, zmanage_exportObject, zmanage_importObject, zmanage_importObjects

Inherited from ZenModelBase.ZenModelBase: __call__, __hash__, all_meta_types, aqBaseHasAttr, breadCrumbs, callZenScreen, checkRemotePerm, checkValidId, createHierarchyObj, custPropertyIds, custPropertyMap, getBreadCrumbUrlPath, getDmd, getDmdObj, getDmdRoot, getHierarchyObj, getIdLink, getNowString, getObjByPath, getPrimaryDmdId, getUnusedId, getZ, getZopeObj, helpLink, isLocalName, manage_deleteObjects, prepId, saveCustProperties, todayDate, urlLink, view, visibleCustPropertyMap, yesterdayDate, zenScreenUrl, zenpathjoin, zenpathsplit, zentinelTabs

Inherited from OFS.History.Historical: manage_afterHistoryCopy, manage_beforeHistoryCopy, manage_change_history, manage_historicalComparison, manage_historyCompare, manage_historyCopy

Inherited from ZenPacker.ZenPacker: addToZenPack, eligiblePacks, findObject

Inherited from DeviceResultInt.DeviceResultInt: getDeviceClassName, getDeviceClassPath, getDeviceIp, getDeviceIpAddress, getDeviceLink, getDeviceMacaddress, getDeviceName, getDeviceUrl, getPingStatus, getPingStatusNumber, getProdState, getSnmpStatus, getSnmpStatusNumber, isResultLockedFromDeletion, isResultLockedFromUpdates, sendEventWhenResultBlocked

Inherited from EventView.EventView: convertEventField, getEventDetail, getEventDetailFromStatusOrHistory, getEventHistory, getEventManager, getEventOwnerList, getEventSummary, getStatusCssClass, getStatusImgSrc, manage_ackBatchEvents, manage_ackEvents, manage_addLogMessage, manage_createEventMap, manage_deleteBatchEvents, manage_deleteEvents, manage_deleteHeartbeat, manage_setEventStates, manage_undeleteBatchEvents, manage_undeleteEvents

Inherited from RRDView.RRDView: cacheRRDValue, fetchRRDValue, fetchRRDValues, fullRRDPath, getDefaultGraphDefs, getGraphDef, getGraphDefUrl, getRRDDataPoint, getRRDDataPoints, getRRDFileName, getRRDNames, getRRDPaths, getRRDSum, getRRDTemplate, getRRDTemplateByName, getRRDValue, getRRDValues, getThresholdInstances, getThresholds, makeLocalRRDTemplate, removeLocalRRDTemplate, rrdPath

Inherited from object: __delattr__, __getattribute__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
  meta_type = 'IpInterface'
  portal_type = 'IpInterface'
  manage_editIpInterfaceForm = DTMLFile('dtml/manageEditIpInterf...
  ifindex = '0'
  interfaceName = ''
  macaddress = ""
  type = ""
  description = ""
  mtu = 0
  speed = 0
  adminStatus = 0
  operStatus = 0
  _ipAddresses = []
  _properties = OSComponent._properties+({'id': 'ips', 'type': '...
  _relations = OSComponent._relations+(("os", ToOne(ToManyCont, ...
  zNoPropertiesCopy = 'ips', 'macaddress'
  localipcheck = re.compile(r'^127.|^0.').search
  localintcheck = re.compile(r'^lo0').search
  defaultIgnoreTypes = 'Other', 'softwareLoopback', 'CATV MAC La...
  factory_type_information = {'id': 'IpInterface', 'meta_type': ...
  security = ClassSecurityInfo()

Inherited from OSComponent.OSComponent: isUserCreatedFlag

Inherited from DeviceComponent.DeviceComponent: __pychecker__, collectors, default_catalog, event_key, perfmonInstance

Inherited from Lockable.Lockable: modelerLock, sendEventWhenBlockedFlag

Inherited from ManagedEntity.ManagedEntity: monitor, snmpindex

Inherited from ZenModelRM.ZenModelRM: isInTree

Inherited from ZenModelBase.ZenModelBase: index_html, sub_meta_types

Inherited from OFS.History.Historical: HistoricalRevisions, __ac_permissions__, manage_change_history_page, manage_options

Inherited from OFS.History.Historical (private): _manage_historyComparePage

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, id, title=None)
(Constructor)

source code 
Init OSComponent and set _ipAddresses to an empty list.
Overrides: ZenModelRM.ZenModelRM.__init__

viewName(self)

source code 
Use the unmagled interface name for display
Overrides: ZenModelRM.ZenModelRM.viewName

primarySortKey(self)

source code 
Use the unmagled interface name for display
Overrides: ZenModelRM.ZenModelRM.primarySortKey

name(self)

source code 
Use the unmagled interface name for display
Overrides: DeviceComponent.DeviceComponent.name

index_object(self)

source code 
Override the default so that links are indexed.
Overrides: ZenModelRM.ZenModelRM.index_object

unindex_object(self)

source code 
Override the default so that links are unindexed.
Overrides: ZenModelRM.ZenModelRM.unindex_object

_prepIp(self, ip, netmask=24)

source code 
Split ips in the format 1.1.1.1/24 into ip and netmask. Default netmask is 24.

addLocalIpAddress(self, ip, netmask=24)

source code 
Add a locally stored ip. Ips like 127./8 are maintained locally.

setIpAddresses(self, ips)

source code 
Set a list of ipaddresses in the form 1.1.1.1/24 on to this interface. If networks for the ips don't exist they will be created.

getRRDTemplateName(self)

source code 
Return the interface type as the target type name.
Overrides: RRDView.RRDView.getRRDTemplateName

getRRDTemplates(self)

source code 
Return a list containing the appropriate RRDTemplate for this IpInterface. If none is found then the list will contain None.
Overrides: RRDView.RRDView.getRRDTemplates

snmpIgnore(self)

source code 
Ignore interface that are operationally down.
Overrides: RRDView.RRDView.snmpIgnore

manage_beforeDelete(self, item, container)

source code 
Unindex this interface after it is deleted.
Overrides: DeviceComponent.DeviceComponent.manage_beforeDelete

Class Variable Details [hide private]

manage_editIpInterfaceForm

Value:
DTMLFile('dtml/manageEditIpInterface', globals())

_properties

Value:
OSComponent._properties+({'id': 'ips', 'type': 'lines', 'mode': 'w', '\
setter': 'setIpAddresses'}, {'id': 'interfaceName', 'type': 'string', \
'mode': 'w'}, {'id': 'ifindex', 'type': 'string', 'mode': 'w'}, {'id':\
 'macaddress', 'type': 'string', 'mode': 'w'}, {'id': 'type', 'type': \
'string', 'mode': 'w'}, {'id': 'description', 'type': 'string', 'mode'\
: 'w'}, {'id': 'mtu', 'type': 'int', 'mode': 'w'}, {'id': 'speed', 'ty\
pe': 'long', 'mode': 'w'}, {'id': 'adminStatus', 'type': 'int', 'mode'\
: 'w'}, {'id': 'operStatus', 'type': 'int', 'mode': 'w'},)

_relations

Value:
OSComponent._relations+(("os", ToOne(ToManyCont, "Products.ZenModel.Op\
eratingSystem", "interfaces")), ("ipaddresses", ToMany(ToOne, "Product\
s.ZenModel.IpAddress", "interface")), ("iproutes", ToMany(ToOne, "Prod\
ucts.ZenModel.IpRouteEntry", "interface")),)

defaultIgnoreTypes

Value:
'Other', 'softwareLoopback', 'CATV MAC Layer'

factory_type_information

Value:
{'id': 'IpInterface', 'meta_type': 'IpInterface', 'description': """Ar\
bitrary device grouping class""", 'icon': 'IpInterface_icon.gif', 'pro\
duct': 'ZenModel', 'factory': 'manage_addIpInterface', 'immediate_view\
': 'viewIpInterface', 'actions':({'id': 'status', 'name': 'Status', 'a\
ction': 'viewIpInterface', 'permissions':(ZEN_VIEW,)}, {'id': 'events'\
, 'name': 'Events', 'action': 'viewEvents', 'permissions':(ZEN_VIEW,)}\
, {'id': 'perfConf', 'name': 'Template', 'action': 'objTemplates', 'pe\
rmissions':("Change Device",)}, {'id': 'viewHistory', 'name': 'Modific\
...