Definition at line 3398 of file objectclasses.py.
Public Member Functions | |
def | __init__ |
def | GetName |
def | GetSystem |
def | SetSystem |
def | GetDevice |
def | SetDevice |
def | GetPortID |
def | SetPortID |
def | GetPortNbr |
def | SetPortNbr |
def | GetPortType |
def | SetPortType |
def | GetPortWay |
def | SetPortWay |
def | GetBia |
def | SetBia |
def | GetMAC |
def | SetMAC |
def | GetPortSpeed |
def | SetPortSpeed |
def | GetPhy |
def | SetPhy |
def | GetPXIBooting |
def | SetPXIBooting |
def | GetIP |
def | SetIP |
def | SetOldIP |
def | GetOldIP |
def | GetAdmStatus |
def | SetAdmStatus |
def | GetIPName |
def | SetIPName |
def | GetSubnet |
def | SetSubnet |
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 | UpdateByPortID |
def | UpdateIPInfo |
def | PrintSaveFunction |
def | Save |
Private Attributes | |
__portInfo | |
__cfg | |
__errormessage |
def objectclasses::Port::__init__ | ( | self, | ||
systemname, | ||||
portnbr = "" , |
||||
porttype = "" , |
||||
portway = PORT_IN , |
||||
devname = "" , |
||||
new = True | ||||
) |
Constructor.
Parameters: - the name of the subsystem a port is in (actually the subsystem the device it is a part of is in). Obsolete and is no longer necessary. - 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. - the device name, of which this port belongs to. Together with port number, port type and port way it is unique in a subsystem.
Definition at line 3413 of file objectclasses.py.
def objectclasses::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: DEVICE_NAME: PORT NUMBER : PORT TYPE : IN/OUT
Definition at line 3449 of file objectclasses.py.
def objectclasses::Port::GetSystem | ( | self | ) |
Definition at line 3460 of file objectclasses.py.
def objectclasses::Port::SetSystem | ( | self, | ||
system | ||||
) |
Definition at line 3462 of file objectclasses.py.
def objectclasses::Port::GetDevice | ( | self | ) |
Definition at line 3465 of file objectclasses.py.
def objectclasses::Port::SetDevice | ( | self, | ||
devname | ||||
) |
Definition at line 3467 of file objectclasses.py.
def objectclasses::Port::GetPortID | ( | self | ) |
Definition at line 3469 of file objectclasses.py.
def objectclasses::Port::SetPortID | ( | self, | ||
portid | ||||
) |
Definition at line 3471 of file objectclasses.py.
def objectclasses::Port::GetPortNbr | ( | self | ) |
Definition at line 3475 of file objectclasses.py.
def objectclasses::Port::SetPortNbr | ( | self, | ||
portnbr | ||||
) |
Definition at line 3477 of file objectclasses.py.
def objectclasses::Port::GetPortType | ( | self | ) |
Definition at line 3480 of file objectclasses.py.
def objectclasses::Port::SetPortType | ( | self, | ||
porttype | ||||
) |
Definition at line 3482 of file objectclasses.py.
def objectclasses::Port::GetPortWay | ( | self | ) |
Definition at line 3485 of file objectclasses.py.
def objectclasses::Port::SetPortWay | ( | self, | ||
portway | ||||
) |
Definition at line 3487 of file objectclasses.py.
def objectclasses::Port::GetBia | ( | self | ) |
Definition at line 3490 of file objectclasses.py.
def objectclasses::Port::SetBia | ( | self, | ||
bia | ||||
) |
Definition at line 3492 of file objectclasses.py.
def objectclasses::Port::GetMAC | ( | self | ) |
Definition at line 3495 of file objectclasses.py.
def objectclasses::Port::SetMAC | ( | self, | ||
mac | ||||
) |
Definition at line 3497 of file objectclasses.py.
def objectclasses::Port::GetPortSpeed | ( | self | ) |
Definition at line 3501 of file objectclasses.py.
def objectclasses::Port::SetPortSpeed | ( | self, | ||
speed | ||||
) |
Definition at line 3503 of file objectclasses.py.
def objectclasses::Port::GetPhy | ( | self | ) |
Definition at line 3506 of file objectclasses.py.
def objectclasses::Port::SetPhy | ( | self, | ||
phy | ||||
) |
Definition at line 3508 of file objectclasses.py.
def objectclasses::Port::GetPXIBooting | ( | self | ) |
Definition at line 3511 of file objectclasses.py.
def objectclasses::Port::SetPXIBooting | ( | self, | ||
pxi | ||||
) |
Definition at line 3513 of file objectclasses.py.
def objectclasses::Port::GetIP | ( | self | ) |
Definition at line 3516 of file objectclasses.py.
def objectclasses::Port::SetIP | ( | self, | ||
ip | ||||
) |
Definition at line 3518 of file objectclasses.py.
def objectclasses::Port::SetOldIP | ( | self, | ||
ip | ||||
) |
Definition at line 3521 of file objectclasses.py.
def objectclasses::Port::GetOldIP | ( | self | ) |
Definition at line 3523 of file objectclasses.py.
def objectclasses::Port::GetAdmStatus | ( | self | ) |
Definition at line 3525 of file objectclasses.py.
def objectclasses::Port::SetAdmStatus | ( | self, | ||
admstatus | ||||
) |
Definition at line 3527 of file objectclasses.py.
def objectclasses::Port::GetIPName | ( | self | ) |
Definition at line 3530 of file objectclasses.py.
def objectclasses::Port::SetIPName | ( | self, | ||
ipname | ||||
) |
Definition at line 3532 of file objectclasses.py.
def objectclasses::Port::GetSubnet | ( | self | ) |
Definition at line 3535 of file objectclasses.py.
def objectclasses::Port::SetSubnet | ( | self, | ||
subnet | ||||
) |
Definition at line 3537 of file objectclasses.py.
def objectclasses::Port::GetSaveStatus | ( | self | ) |
Definition at line 3541 of file objectclasses.py.
def objectclasses::Port::SetSaveStatus | ( | self, | ||
status | ||||
) |
Definition at line 3543 of file objectclasses.py.
def objectclasses::Port::GetModifyStatus | ( | self | ) |
Definition at line 3545 of file objectclasses.py.
def objectclasses::Port::SetModifyStatus | ( | self, | ||
status | ||||
) |
Definition at line 3547 of file objectclasses.py.
def objectclasses::Port::GetErrorMessage | ( | self | ) |
Get the error message that was set most recently.
!return - the error message string
Reimplemented from objectclasses::DBInfo.
Definition at line 3550 of file objectclasses.py.
def objectclasses::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 3552 of file objectclasses.py.
def objectclasses::Port::SetDict | ( | self, | ||
newdict | ||||
) |
Definition at line 3554 of file objectclasses.py.
def objectclasses::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 3563 of file objectclasses.py.
def objectclasses::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 3573 of file objectclasses.py.
def objectclasses::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 3581 of file objectclasses.py.
def objectclasses::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 3596 of file objectclasses.py.
def objectclasses::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 3613 of file objectclasses.py.
def objectclasses::Port::UpdateByPortID | ( | self | ) |
If we have the portID for a port object; we can update the information for this object with info from the ConfDB usign the portID.
!return - the port member variable dictionary
Definition at line 3708 of file objectclasses.py.
def objectclasses::Port::UpdateIPInfo | ( | self, | ||
ip | ||||
) |
Update IP address and related network information for this port. This is not included in the other Update(...) method because most devices and ports does not have this network information.
Parameters: - the IP address (unique) of the port to be updated with info from ConfDB.
Definition at line 3787 of file objectclasses.py.
def objectclasses::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 3834 of file objectclasses.py.
def objectclasses::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 3884 of file objectclasses.py.
objectclasses::Port::__portInfo [private] |
Definition at line 3415 of file objectclasses.py.
objectclasses::Port::__cfg [private] |
Definition at line 3437 of file objectclasses.py.
objectclasses::Port::__errormessage [private] |