objectclasses::Spare_Device Class Reference

Inheritance diagram for objectclasses::Spare_Device:

objectclasses::DBInfo cdbVisCore::dbUpdate

List of all members.


Detailed Description

Class for storing information about a spare device. A spare device is a physical device with no connections

Definition at line 3968 of file objectclasses.py.


Public Member Functions

def __init__
def GetModifyStatus
def GetComments
def GetLocation
def GetResponsible
def GetHWType
def GetSerial
def GetOldName
def GetSaveStatus
def GetHWName
def GetColour
def GetTheDict
def GetErrorMessage
def GetName
def SetModifyStatus
def SetComments
def SetLocation
def SetResponsible
def SetHWType
def SetHWType
def SetSerial
def SetOldName
def SetSaveStatus
def SetErrorMessage
def SetDict
def SetAllInfoDict
def GetObjectInfo
def Update
def GetSparePorts
def PrintSaveFunction
def Save
def Delete
def Modify
def Create

Private Attributes

 __errormessage
 __sparedeviceInfo
 __spareports
 __cfg
 __ports

Member Function Documentation

def objectclasses::Spare_Device::__init__ (   self,
  hwtype,
  serialnb,
  hwname = "",
  new = True 
)

Constructor.

Parameters: - the name of the spare device, given by the user. like SPARE_HYBRUD_01 optional - should be prefixed by the system if it is only meant for a specific subsystem - serialnb - whether the device is about to be created, or is already created. True if it is being created, False if not. If it is already created, we will fill the object with goods. (names and values)

Definition at line 3981 of file objectclasses.py.

def objectclasses::Spare_Device::GetModifyStatus (   self  ) 

Definition at line 4010 of file objectclasses.py.

def objectclasses::Spare_Device::GetComments (   self  ) 

Definition at line 4012 of file objectclasses.py.

def objectclasses::Spare_Device::GetLocation (   self  ) 

Definition at line 4014 of file objectclasses.py.

def objectclasses::Spare_Device::GetResponsible (   self  ) 

Definition at line 4016 of file objectclasses.py.

def objectclasses::Spare_Device::GetHWType (   self  ) 

Definition at line 4018 of file objectclasses.py.

def objectclasses::Spare_Device::GetSerial (   self  ) 

Definition at line 4020 of file objectclasses.py.

def objectclasses::Spare_Device::GetOldName (   self  ) 

Definition at line 4022 of file objectclasses.py.

def objectclasses::Spare_Device::GetSaveStatus (   self  ) 

Definition at line 4024 of file objectclasses.py.

def objectclasses::Spare_Device::GetHWName (   self  ) 

Definition at line 4026 of file objectclasses.py.

def objectclasses::Spare_Device::GetColour (   self  ) 

Definition at line 4028 of file objectclasses.py.

def objectclasses::Spare_Device::GetTheDict (   self  ) 

Definition at line 4030 of file objectclasses.py.

def objectclasses::Spare_Device::GetErrorMessage (   self  ) 

Get the error message that was set most recently.

!return - the error message string

Reimplemented from objectclasses::DBInfo.

Definition at line 4032 of file objectclasses.py.

def objectclasses::Spare_Device::GetName (   self  ) 

Definition at line 4034 of file objectclasses.py.

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

Definition at line 4038 of file objectclasses.py.

def objectclasses::Spare_Device::SetComments (   self,
  comments 
)

Definition at line 4040 of file objectclasses.py.

def objectclasses::Spare_Device::SetLocation (   self,
  location 
)

Definition at line 4043 of file objectclasses.py.

def objectclasses::Spare_Device::SetResponsible (   self,
  responsible 
)

Definition at line 4046 of file objectclasses.py.

def objectclasses::Spare_Device::SetHWType (   self,
  hwtype 
)

Definition at line 4049 of file objectclasses.py.

def objectclasses::Spare_Device::SetHWType (   self,
  hwname 
)

Definition at line 4052 of file objectclasses.py.

def objectclasses::Spare_Device::SetSerial (   self,
  serial 
)

Definition at line 4055 of file objectclasses.py.

def objectclasses::Spare_Device::SetOldName (   self,
  oldname 
)

Definition at line 4058 of file objectclasses.py.

def objectclasses::Spare_Device::SetSaveStatus (   self,
  state 
)

Definition at line 4060 of file objectclasses.py.

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

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

Reimplemented from objectclasses::DBInfo.

Definition at line 4062 of file objectclasses.py.

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

Definition at line 4065 of file objectclasses.py.

def objectclasses::Spare_Device::SetAllInfoDict (   self,
  devinfo 
)

Copy device info from one device to another (this one).

Definition at line 4073 of file objectclasses.py.

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

Get all info about a device in a subsystem, given the unique name of a device.

Here we do some check where to get the properies information from, f.ex. whether this device object is the most recent object in dirty list; if so we can just return this objects dictionary. TODO.

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

Definition at line 4091 of file objectclasses.py.

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

Here we update the device with the most recent information about the device witht the given information; either in dirty objects list (if found and in creation mode), or from ConfDB.

- if True, we do not check in dirty objects list, but go straight forward to the ConfDB and look for information about this device there.

Definition at line 4107 of file objectclasses.py.

def objectclasses::Spare_Device::GetSparePorts (   self  ) 

Get all ports assigned to a device as port objects in a list. Look for ports in both dirty objects list and ConfDB.

!return - list of port objects for the ports of a device.

Definition at line 4174 of file objectclasses.py.

def objectclasses::Spare_Device::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 4271 of file objectclasses.py.

def objectclasses::Spare_Device::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 4308 of file objectclasses.py.

def objectclasses::Spare_Device::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 4362 of file objectclasses.py.

def objectclasses::Spare_Device::Modify (   self,
  commit = 1 
)

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-functions for the parameters they change.

Definition at line 4373 of file objectclasses.py.

def objectclasses::Spare_Device::Create (   self  ) 

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

Reimplemented from objectclasses::DBInfo.

Definition at line 4381 of file objectclasses.py.


Member Data Documentation

objectclasses::Spare_Device::__errormessage [private]

Reimplemented from objectclasses::DBInfo.

Definition at line 3983 of file objectclasses.py.

objectclasses::Spare_Device::__sparedeviceInfo [private]

Definition at line 3985 of file objectclasses.py.

objectclasses::Spare_Device::__spareports [private]

Definition at line 4002 of file objectclasses.py.

objectclasses::Spare_Device::__cfg [private]

Definition at line 4003 of file objectclasses.py.

objectclasses::Spare_Device::__ports [private]

Definition at line 4253 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