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

# Class IpInterface

source code

                     object --+
                              |
              Lockable.Lockable --+
                                  |
    DeviceComponent.DeviceComponent --+
                                      |
        ManagedEntity.ManagedEntity --+
                                      |
                OSComponent.OSComponent --+
                                          |
                  Linkable.Linkable --+   |
                                      |   |
                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, idxs=None) Override the default so that links are indexed. | source code
unindex_object(self) Override the default so that links are unindexed. | source code
manage_deleteComponent(self, REQUEST=None) Reindexes all the ip addresses on this interface after it has been deleted | 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 IP address as an integter for sorting purposes. | source code
getIpAddress(self) Return the first IP address with its netmask ie: 1.1.1.1/24. | source code
getIpAddressObj(self) Return the first real IP address 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 administratively down. | source code
getAdminStatus(self) Get the current administrative state of the interface. | source code
getAdminStatusString(self) Return the current administrative state of the interface converted to its string version. | source code
getOperStatus(self) Get the current operational state of the interface. | source code
getOperStatusString(self) Return the current operational state of the interface converted to its string version. | source code
getStatus(self, statClass=None) Return the status number for this interface. | source code
niceSpeed(self) Return a string that expresses self.speed in reasonable units. | 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
niceDuplex(self) Return a string that expresses self.duplex into human readable format. | source code
Inherited from `OSComponent.OSComponent`: `device`, `getPrettyLink`, `isUserCreated`, `manage_updateComponent`, `setUserCreateFlag` Inherited from `DeviceComponent.DeviceComponent`: `filterAutomaticCreation`, `getAqProperty`, `getClassObject`, `getCollectors`, `getIconPath`, `getInstDescription`, `getManageIp`, `getNagiosTemplate`, `getParentDeviceName`, `getParentDeviceTitle`, `getParentDeviceUrl`, `getRRDContextData`, `getStatusString`, `getSubComponentsNoIndexGen`, `hostname`, `monitored`, `setAqProperty` Inherited from `Lockable.Lockable`: `getNextLockableParent`, `isLockedFromDeletion`, `isLockedFromUpdates`, `isUnlocked`, `lockFromDeletion`, `lockFromUpdates`, `lockStatus`, `lockWarning`, `sendEventWhenBlocked`, `setSendEventWhenBlockedFlag`, `unlock`, `unsetSendEventWhenBlockedFlag` Inherited from `Linkable.Linkable`: `index_links`, `unindex_links` Inherited from `Linkable.Linkable` (private): `_getLinkCatalog`

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`
| duplex = `0`
| _ipAddresses = `[]`
| _properties = `OSComponent._properties+({'id': 'ips', 'type': '`...``
| _relations = `OSComponent._relations+(("os", ToOne(ToManyCont, `...``
| zNoPropertiesCopy = `'ips', 'macaddress'`
| localipcheck = `re.compile(r'^127.|^0.|^::1$|^fe80:').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 `Linkable.Layer2Linkable`: `link_catalog`

Method Details | [hide private]

### __init__(self, id, title=None) (Constructor) | source code
Init OSComponent and set _ipAddresses to an empty list. Overrides: object.__init__

### name(self) | source code
Use the unmagled interface name for display Overrides: DeviceComponent.DeviceComponent.name

### manage_deleteComponent(self, REQUEST=None) | source code
Reindexes all the ip addresses on this interface after it has been deleted Overrides: OSComponent.OSComponent.manage_deleteComponent

### _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.

### getRRDTemplates(self) | source code
Return a list containing the appropriate RRDTemplate for this IpInterface. If none is found then the list will be empty. Order of preference if the interface supports 64bit counters. <type>_64 ethernetCsmacd_64 <type> ethernetCsmacd Order of preference if the interface doesn't support 64bit counters. <type> ethernetCsmacd

### getAdminStatus(self) | source code
Get the current administrative state of the interface. Prefer real-time value over modeled value.

### getOperStatus(self) | source code
Get the current operational state of the interface. Prefer real-time value over modeled value.

### getStatus(self, statClass=None) | source code
Return the status number for this interface. Overrides: DeviceComponent.DeviceComponent.getStatus

### deviceId(self) | source code
The device id, for indexing purposes. Overrides: Linkable.Layer2Linkable.deviceId

### interfaceId(self) | source code
The interface id, for indexing purposes. Overrides: Linkable.Layer2Linkable.interfaceId

### lanId(self) | source code
pass Overrides: Linkable.Layer2Linkable.lanId

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'}, {'id': 'dupl
      ...

  ### _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",)},)},