objectclasses::Spare_Port Class Reference

Inheritance diagram for objectclasses::Spare_Port:

objectclasses::DBInfo cdbVisCore::dbUpdate

List of all members.


Detailed Description

A port is a physical part of a device; f.ex. a port on a switch. So this class contains properties (member variables) and methods for a port of a spare device instance.

Definition at line 4395 of file objectclasses.py.


Public Member Functions

def __init__
def GetName
def GetSpareDevice
def SetSpareDevice
def GetPortNbr
def SetPortNbr
def GetPortType
def SetPortType
def GetPortWay
def SetPortWay
def GetBia
def SetBia
def GetMAC
def SetMAC
def GetSaveStatus
def SetSaveStatus
def GetModifyStatus
def SetModifyStatus
def GetErrorMessage
def SetErrorMessage
def SetDict
def Delete
def Modify
def Create
def GetObjectInfo
def Update
def PrintSaveFunction
def Save

Private Attributes

 __spareportInfo
 __cfg
 __errormessage

Member Function Documentation

def objectclasses::Spare_Port::__init__ (   self,
  portnbr = "",
  porttype = "",
  portway = PORT_IN,
  serialnb = "",
  new = True 
)

Constructor.

Parameters: - the port number, a string and usually an integer, not unique alone. - the port type, a string, not unique alone. - the port way (direction, in or out). It is unique together with port number and port type it for a device. - serailn of the spare device, of which this port belongs to. Together with port number, port type and port way it is unique .

Definition at line 4408 of file objectclasses.py.

def objectclasses::Spare_Port::GetName (   self  ) 

Since a port does not have a unique name, but a collection of several properties together; we create a port name with the following syntax/format: SERIALNB: PORT NUMBER : PORT TYPE : IN/OUT

Definition at line 4434 of file objectclasses.py.

def objectclasses::Spare_Port::GetSpareDevice (   self  ) 

Definition at line 4446 of file objectclasses.py.

def objectclasses::Spare_Port::SetSpareDevice (   self,
  serial 
)

Definition at line 4448 of file objectclasses.py.

def objectclasses::Spare_Port::GetPortNbr (   self  ) 

Definition at line 4450 of file objectclasses.py.

def objectclasses::Spare_Port::SetPortNbr (   self,
  portnbr 
)

Definition at line 4452 of file objectclasses.py.

def objectclasses::Spare_Port::GetPortType (   self  ) 

Definition at line 4455 of file objectclasses.py.

def objectclasses::Spare_Port::SetPortType (   self,
  porttype 
)

Definition at line 4457 of file objectclasses.py.

def objectclasses::Spare_Port::GetPortWay (   self  ) 

Definition at line 4460 of file objectclasses.py.

def objectclasses::Spare_Port::SetPortWay (   self,
  portway 
)

Definition at line 4462 of file objectclasses.py.

def objectclasses::Spare_Port::GetBia (   self  ) 

Definition at line 4465 of file objectclasses.py.

def objectclasses::Spare_Port::SetBia (   self,
  bia 
)

Definition at line 4467 of file objectclasses.py.

def objectclasses::Spare_Port::GetMAC (   self  ) 

Definition at line 4470 of file objectclasses.py.

def objectclasses::Spare_Port::SetMAC (   self,
  mac 
)

Definition at line 4472 of file objectclasses.py.

def objectclasses::Spare_Port::GetSaveStatus (   self  ) 

Definition at line 4476 of file objectclasses.py.

def objectclasses::Spare_Port::SetSaveStatus (   self,
  status 
)

Definition at line 4478 of file objectclasses.py.

def objectclasses::Spare_Port::GetModifyStatus (   self  ) 

Definition at line 4480 of file objectclasses.py.

def objectclasses::Spare_Port::SetModifyStatus (   self,
  status 
)

Definition at line 4482 of file objectclasses.py.

def objectclasses::Spare_Port::GetErrorMessage (   self  ) 

Get the error message that was set most recently.

!return - the error message string

Reimplemented from objectclasses::DBInfo.

Definition at line 4485 of file objectclasses.py.

def objectclasses::Spare_Port::SetErrorMessage (   self,
  msg 
)

Set the error message so that it can be looked up. - the message string

Reimplemented from objectclasses::DBInfo.

Definition at line 4487 of file objectclasses.py.

def objectclasses::Spare_Port::SetDict (   self,
  newdict 
)

Definition at line 4489 of file objectclasses.py.

def objectclasses::Spare_Port::Delete (   self  ) 

Sets the save status of this object to delete, and adds it to the dirty objects list for later update in the ConfDB.

Reimplemented from objectclasses::DBInfo.

Definition at line 4498 of file objectclasses.py.

def objectclasses::Spare_Port::Modify (   self  ) 

Sets the save status of this object to modify, and adds it to the dirty objects list for later update in the ConfDB. The modify status is set in the respective Set-methods.

Reimplemented from objectclasses::DBInfo.

Definition at line 4508 of file objectclasses.py.

def objectclasses::Spare_Port::Create (   self  ) 

Sets the save status of this object to delete, and adds it to the dirty objects list for later update in the ConfDB.

Reimplemented from objectclasses::DBInfo.

Definition at line 4516 of file objectclasses.py.

def objectclasses::Spare_Port::GetObjectInfo (   self,
  doNotLookUp = True 
)

Get all info about a port.

TODO: Here we can have checks whether we need to look for port information in dirty objects list or ConfDB if this is the most recent version of the port object.

- whether we should look for information about this object in dirty objects list and ConfDB (False) or not(True).

Definition at line 4531 of file objectclasses.py.

def objectclasses::Spare_Port::Update (   self,
  doNotCheckInDirtyList = False 
)

Update the information/parameters for this link with the most recent information, and also return the member variable dictionary.

Parameters: - if set to True, we do not check in the dirty objects list for a version of the object.

!return - the member variable dictionary of parameters for the link type

Definition at line 4548 of file objectclasses.py.

def objectclasses::Spare_Port::PrintSaveFunction (   self,
  first = False,
  insertmany = False,
  commit = True 
)

A function that returns the string to the function that will be called in the ConfDBLibrary for the given save and modify status of this data object, as well as use of single or multiple insert.

Parameters: Same as for Save(...)

!return - returns a String with the function name as well as all set parameters

Definition at line 4638 of file objectclasses.py.

def objectclasses::Spare_Port::Save (   self,
  first = False,
  insertmany = False,
  commit = True 
)

Update changes to the ConfDB for this object.

Parameters: - if first is True; it is the first kind of this db update; prepare and initialize cache, if first is False, add it to the already existing cache. cache is only used if insertmany = True. - If insertmany is set to false, the single insert function will be used, which is optimized for single inserts. If insertmany is set to true, the multiple insert function will be used, which is optimized for multiple inserts (use of cache) - if commit is set to false, no data will be commited, put are put on hold in the cache, if commit is set to true, all data that are put on hold in the cache will be commited.

Definition at line 4666 of file objectclasses.py.


Member Data Documentation

objectclasses::Spare_Port::__spareportInfo [private]

Definition at line 4410 of file objectclasses.py.

objectclasses::Spare_Port::__cfg [private]

Definition at line 4422 of file objectclasses.py.

objectclasses::Spare_Port::__errormessage [private]

Reimplemented from objectclasses::DBInfo.

Definition at line 4427 of file objectclasses.py.


The documentation for this class was generated from the following file:
Generated on Fri Aug 31 11:11:20 2007 for CDBVis by  doxygen 1.5.3