Main Page | Namespace List | Class List | Directories | File List | Class Members | File Members

CONFDB Class Reference

#include <CONFDB.h>

List of all members.

Public Member Functions

 CONFDB (string dbname, string login, string passwd)
 ~CONFDB ()
int PyDBConnexion ()
int PyDBDeconnexion ()
string PyGetDeviceTypeRow (string systemname, string devitype)
string PyGetDeviceRow_devicename (string systemname, string deviname)
string PyGetDeviceRow_deviceid (string systemname, int devid)
string PyGetPortRow_pid (string sysname, int dID)
string PyGetPortRow_devid (string sysname, int devid, int port_nb)
string PyGetConnectivityRow_lkid (string sysname, int lkid)
string PyGetConnectivityRow_node (string sysname, int nodeid, int port_nb, int way_given)
string PyGetMacIPRow (string sysname, string macAdd)
string PyGetLkTypeRow_lkname (string sysname, string lname)
string PyGetLkTypeRow_lknb (string sysname, int lknb)
vector< int > PyGetPortIDPerDevID (string sysname, int dID)
vector< string > PyGetDeviceNamesPerType (string sysname, string dtype)
string PyGetMacAddPerDevID (string sysname, int dID)
vector< int > PyGetLkToDevID (string sysname, int nto)
vector< int > PyGetLkFromDevID (string sysname, int nfrom)
vector< int > PyGetDeviceIDsPerType (string sysname, string dtype)
string PyInsertPort (string sysname, string devname, int ptnb, vector< int > param_list, string pwiresense, string pphy, int last)
string PyInsertMultiplePorts (string sysname, string devname, int ptnb, vector< int > param_list, string pwiresense, string pphy, int first, int last)
string PyInsertMultipleLinks (string sysname, string nfrom, string nto, int pfrom, int pto, int lk_used, string lk_type, int bidirectional, string tklink, int lk_tk, int first, int last)
string PyInsertMultipleMacIPs (string sysname, string eth_add, string ipadd, string submask, string vlan, string IPname, int lkagg, string dname, int ptnb, int first, int last)
string PyInsertMultipleCompositeLinkTypes (string sysname, string lktype, string lktype_list_concan, int first, int last)
string PyInsertMultipleSimpleLinkTypes (string sysname, string lktype, int first, int last)
string PyInsertMultipleDevices (string sysname, string devname, string devtype, int dnode, int promismode, int nused, string duuid, string dbcode, int first, int last)
string PyInsertMultipleDeviceTypes (string sysname, string devtype, int nb_in, int nb_out, string devdescr, int first, int last)
string PyInsertLink (string sysname, string nfrom, string nto, int pfrom, int pto, int lk_used, string lk_type, int bidirectional, string tklink, int lk_tk, int last)
string PyInsertMacIP (string sysname, string eth_add, string ipadd, string submask, string vlan, string IPname, int lkagg, string dname, int ptnb, int last)
string PyInsertCompositeLinkType (string sysname, string lktype, string lktype_list_concan, int last)
string PyInsertDevice (string sysname, string devname, string devtype, int dnode, int promismode, int nused, string duuid, string dbcode, int last)
string PyInsertDeviceType (string sysname, string devtype, int nb_in, int nb_out, string devdescr, int last)
string PyInsertSimpleLinkType (string sysname, string lktype, int last)
vector< int > PyGetConnOutBetweenDeviceDeviceType (string sysname, string nfrom, string nto)
vector< string > PyGetDetailedConnectivityBetweenDevices (string sysname, string nfrom, string nto)
int PyCreateTableSchema (string sysname, int mactable, int porttable, int bootimagetable, int genericschema)
vector< string > PyGetConnectivityBetweenDevices (string sysname, string nfrom, string nto)
vector< string > PyGetDestinationNamePerDevPort (string sysname, string devtype, int port_nb)
int PyGetDeviceID_devicename (string sysname, string devname)
string PyGetDeviceName_deviceid (string sysname, int devID)
vector< string > PyGetDetailedConnBetweenDeviceDevType (string sysname, string nfrom, string nto, int dtype_given)
int PyDropTableSchema (string sysname)
vector< string > PyGetFreeDeviceNamesPerType (string sysname, string dtype)
int PyCreateDestinationTable (string sysname, string dname, int roundtrip)
int PyCreateRoutingTable (string sysname, string devname, int roundtrip)
vector< string > PyGetAllPathsPerDevice (string systemname, string devicename)
vector< string > PyMatchDeviceIDDeviceName (string systemname)
vector< string > PyLoadConnectivityTable (string systemname)
vector< string > PyLoadDeviceTypeTable (string systemname)
vector< string > PyLoadLinkTypeTable (string systemname)

Private Attributes

string _dbname
string _login
string _passwd


Detailed Description

CONFDB class .


Constructor & Destructor Documentation

CONFDB::CONFDB string  dbname,
string  login,
string  passwd
 

CONFDB Constructor .

Parameters:
dbname : name of the database.
login : user login.
passwd : user password.

CONFDB::~CONFDB  ) 
 

CONFDB destructor . no param


Member Function Documentation

int CONFDB::PyCreateDestinationTable string  sysname,
string  dname,
int  roundtrip
 

create the destination table of a given device and stored in the database, returning a int

Parameters:
sysname : name of the subsystem.
dname : device name
roundtrip : maximum path length
Returns:
0 if successfully created
Exceptions:
CONFDBEXCEPTION .

int CONFDB::PyCreateRoutingTable string  sysname,
string  devname,
int  roundtrip
 

create the routing table of a given device and stored in the database, returning a int

Parameters:
sysname : name of the subsystem.
devname : device name
roundtrip : maximum path length
Returns:
0 if successfully created
Exceptions:
CONFDBEXCEPTION .

int CONFDB::PyCreateTableSchema string  sysname,
int  mactable,
int  porttable,
int  bootimagetable,
int  genericschema
 

create the tables, indexes and constraints in your DB schema, returning a int .

Parameters:
sysname : name of the subsystem
mactable : 1 if you need a MAC/IP table
porttable : 1 if you need a port table (mandatory if mac_table=1)
bootimagetable : 1 if you need a boot image table
genericschema : 1 to get the basic schema (mandatory the first time)
Returns:
0 if it is successful
Exceptions:
CONFDBEXCEPTION .

int CONFDB::PyDBConnexion  ) 
 

Connect to the database with the login,pwd and db as provided in the constructor .

Exceptions:
CONFDBEXCEPTION .
Returns:
0 if the connection is successful

int CONFDB::PyDBDeconnexion  ) 
 

Disconnect from the database no input arguments and returning a int .

Exceptions:
CONFDBEXCEPTION .
Returns:
0 if the disconnection is successful

int CONFDB::PyDropTableSchema string  sysname  ) 
 

drop the tables, indexes and constraints in your DB schema, returning a int . The user should use this function with caution no way to rollback!

Parameters:
sysname : name of the subsystem
Returns:
0 if it is successful
Exceptions:
CONFDBEXCEPTION .

vector< string > CONFDB::PyGetAllPathsPerDevice string  systemname,
string  devicename
 

get all the paths going through a given device , returning a vector of strings

Parameters:
systemname : name of the subsystem.
devicename : device name
Returns:
the list of paths formatted as follows:pathid|link_pos|linkid
Exceptions:
CONFDBEXCEPTION : "NO_ROWS_SELECTED", if no matching entry in the table has been found .

vector< string > CONFDB::PyGetConnectivityBetweenDevices string  sysname,
string  nfrom,
string  nto
 

Get the path (just the first and last link details) between nfrom and nto, returning a vector of strings .

Parameters:
sysname : name of the subsystem
nfrom : name of the device 1 (ex. THOR_00)
nto : name of the device 2 (ex. ECAL_L1FE06_00_00)
Returns:
a vector of strings, one entry of the vector corresponds to the concetenation of |port_nbfrom|port_nbto|pathid|, otherwise twice "Error"
Exceptions:
CONFDBEXCEPTION : "NO_ROWS_SELECTED", if no matching entry in the table has been found .

string CONFDB::PyGetConnectivityRow_lkid string  sysname,
int  lkid
 

Get the link row in Conn_row, returning a string .

Parameters:
sysname : name of the subsystem.
lkid : lkID of the link
Returns:
formatted as follows |db_column_name (db_column_type):db_column_value|

db_column_type is I for int and C for char*

Exceptions:
CONFDBEXCEPTION : "NO_ROWS_SELECTED", if no matching entry in the table has been found .

string CONFDB::PyGetConnectivityRow_node string  sysname,
int  nodeid,
int  port_nb,
int  way_given
 

Get the link row in Conn_row,returning a string .

Parameters:
sysname : name of the subsystem
nodeid : node_name of the device
port_nb : port_nb of the device
way_given : 1 if the deviceID corresponds to the start of the link otherwise it's considered as the end of the link
Returns:
formatted as follows |db_column_name (db_column_type):db_column_value|

db_column_type is I for int and C for char*

Exceptions:
CONFDBEXCEPTION : "NO_ROWS_SELECTED", if no matching entry in the table has been found .

vector< int > CONFDB::PyGetConnOutBetweenDeviceDeviceType string  sysname,
string  nfrom,
string  nto
 

Get the port nbs out between dev_from and devtype, returning a vector of int .

Parameters:
sysname : name of the subsystem
nfrom : name of the device 1 (ex. THOR_00)
nto : name of a devicetype (ex. ECAL_L1FE)
Returns:
the list of ports
Exceptions:
CONFDBEXCEPTION : "NO_ROWS_SELECTED", if no matching entry in the table has been found .

vector< string > CONFDB::PyGetDestinationNamePerDevPort string  sysname,
string  devtype,
int  port_nb
 

Get the list of possible destination reachable from this port

Parameters:
sysname : name of the subsystem.
devtype : device name
port_nb : port nb of the device
Returns:
list of the devices
Exceptions:
CONFDBEXCEPTION : "NO_ROWS_SELECTED", if no matching entry in the table has been found .

vector< string > CONFDB::PyGetDetailedConnBetweenDeviceDevType string  sysname,
string  nfrom,
string  nto,
int  dtype_given
 

Get the path details between nfrom and nto, returning a vector of strings .

Parameters:
sysname : name of the subsystem
nfrom : name of the device 1 (ex. THOR_00)
nto : name of the devicetype 2 (ex. ECAL_L1FE06)
dtype_given : 1 if it's a device type, 0 if it should be like 'nto'
Returns:
a vector of strings, one entry of the vector corresponds to the concetenation of |node_from_name|node_to_name|port_nbfrom|port_nbto|lk_pos|pathid|
Exceptions:
CONFDBEXCEPTION : "NO_ROWS_SELECTED", if no matching entry in the table has been found .

vector< string > CONFDB::PyGetDetailedConnectivityBetweenDevices string  sysname,
string  nfrom,
string  nto
 

Get the path details between nfrom and nto, returning a vector of strings .

Parameters:
sysname : name of the subsystem
nfrom : name of the device 1 (ex. THOR_00)
nto : name of the device 2 (ex. ECAL_L1FE06_00_00)
Returns:
a vector of strings, one entry of the vector corresponds to the concetenation of |node_from_name|node_to_name|port_nbfrom|port_nbto|lk_pos|pathid|
Exceptions:
CONFDBEXCEPTION : "NO_ROWS_SELECTED", if no matching entry in the table has been found .

int CONFDB::PyGetDeviceID_devicename string  sysname,
string  devname
 

Get the deviceid corresponding to the devicename

Parameters:
sysname : name of the subsystem
devname : deviceid
Returns:
deviceid
Exceptions:
CONFDBEXCEPTION : "NO_ROWS_SELECTED", if no matching entry in the table has been found .

vector< int > CONFDB::PyGetDeviceIDsPerType string  sysname,
string  dtype
 

Get the list of deviceID of the given device type, returning a vetcor of int .

Parameters:
sysname : name of the subsystem.
dtype : device type name
Returns:
the list of deviceids
Exceptions:
CONFDBEXCEPTION : "NO_ROWS_SELECTED", if no matching entry in the table has been found .

string CONFDB::PyGetDeviceName_deviceid string  sysname,
int  devID
 

Get the devicename corresponding to the deviceid

Parameters:
sysname : name of the subsystem
devID : deviceid
Returns:
devicename
Exceptions:
CONFDBEXCEPTION : "NO_ROWS_SELECTED", if no matching entry in the table has been found .

vector< string > CONFDB::PyGetDeviceNamesPerType string  sysname,
string  dtype
 

Get the list of devices of the given device type, returning a vector of strings.

Parameters:
sysname : name of the subsystem.
dtype : device type name
Returns:
the lsit of devicenames
Exceptions:
CONFDBEXCEPTION : "NO_ROWS_SELECTED", if no matching entry in the table has been found .

string CONFDB::PyGetDeviceRow_deviceid string  systemname,
int  devid
 

Get the row of the given deviceID of the device in device_result,returning a string .

Parameters:
systemname : name of the subsystem .
devid : deviceID of the device
Returns:
case of success formatted as follows |db_column_name (db_column_type):db_column_value|

db_column_type is I for int and C for char*

Exceptions:
CONFDBEXCEPTION : "NO_ROWS_SELECTED", if no matching entry in the table has been found.

string CONFDB::PyGetDeviceRow_devicename string  systemname,
string  deviname
 

Get the row of the given device name in device_result, returning a string.

Parameters:
systemname : name of the subsystem.
deviname : device name: it's not case sensitive.
Returns:
if successful formatted as follows |db_column_name (db_column_type):db_column_value|
Exceptions:
CONFDBEXCEPTION : "NO_ROWS_SELECTED", if no matching entry in the table has been found.

string CONFDB::PyGetDeviceTypeRow string  systemname,
string  devitype
 

Get the row of the given device type in devtype_result, returning a string value.

Parameters:
systemname : name of the subsystem
devitype : device type name: it's not case sensitive.
Returns:
string if successfull formatted as follows |db_column_name (db_column_type):db_column_value|
Exceptions:
CONFDBEXCEPTION : "NO_ROWS_SELECTED", if no matching entry in the table has been found .

vector< string > CONFDB::PyGetFreeDeviceNamesPerType string  sysname,
string  dtype
 

Get the list of devices of the given device type, returning a vetcor of string .

Parameters:
sysname : name of the subsystem.
dtype : device type name
Returns:
vector of strings (list of free devices)
Exceptions:
CONFDBEXCEPTION : "NO_ROWS_SELECTED", if no matching entry in the table has been found .

vector< int > CONFDB::PyGetLkFromDevID string  sysname,
int  nfrom
 

Get the list of LkID which start from the given deviceID, returning a vector of int.

Parameters:
sysname : name of the subsystem
nfrom : deviceID
Returns:
the list of linkIDs,
Exceptions:
CONFDBEXCEPTION : "NO_ROWS_SELECTED", if no matching entry in the table has been found .

vector< int > CONFDB::PyGetLkToDevID string  sysname,
int  nto
 

Get the list of LkID which end at the given deviceID, returning a vector of int

Parameters:
sysname : name of the subsystem
nto : deviceID
Returns:
the list of linkIDs,
Exceptions:
CONFDBEXCEPTION : "NO_ROWS_SELECTED", if no matching entry in the table has been found.

string CONFDB::PyGetLkTypeRow_lkname string  sysname,
string  lname
 

Get the link type row in LkType_row, returning a string .

Parameters:
sysname : name of the subsystem
lname :link type name about which you want to get some info
Returns:
formatted as follows |db_column_name (db_column_type):db_column_value|

db_column_type is I for int and C for char*

Exceptions:
CONFDBEXCEPTION : "NO_ROWS_SELECTED", if no matching entry in the table has been found .

string CONFDB::PyGetLkTypeRow_lknb string  sysname,
int  lknb
 

Get the link type row in LkType_row, returning a string .

Parameters:
sysname : name of the subsystem
lknb :link type id about which you want to get some info
Returns:
formatted as follows |db_column_name (db_column_type):db_column_value|

db_column_type is I for int and C for char*

Exceptions:
CONFDBEXCEPTION : "NO_ROWS_SELECTED", if no matching entry in the table has been found .

string CONFDB::PyGetMacAddPerDevID string  sysname,
int  dID
 

Get the list of ethernet of the given deviceID, returning a string .

Parameters:
sysname : name of the subsystem
dID : deviceID
Returns:
the different ethernet adds are separated by |,
Exceptions:
CONFDBEXCEPTION : "NO_ROWS_SELECTED", if no matching entry in the table has been found.

string CONFDB::PyGetMacIPRow string  sysname,
string  macAdd
 

Get the mac row in MacIP_row, and returning a string .

Parameters:
sysname : name of the subsystem
macAdd : ethernet address about which you want to get some info
Returns:
formatted as follows |db_column_name (db_column_type):db_column_value|

db_column_type is I for int and C for char*

Exceptions:
CONFDBEXCEPTION : "NO_ROWS_SELECTED", if no matching entry in the table has been found .

vector< int > CONFDB::PyGetPortIDPerDevID string  sysname,
int  dID
 

Get the list of portID of the given deviceID, returning a vector of int .

Parameters:
sysname : name of the subsystem.
dID : deviceID
Exceptions:
CONFDBEXCEPTION : "NO_ROWS_SELECTED", if no matching entry in the table has been found .

string CONFDB::PyGetPortRow_devid string  sysname,
int  devid,
int  port_nb
 

Get the port row in port_row_result, returning a string value.

Parameters:
sysname : name of the subsystem
devid : deviceID of the device
port_nb : port nb of the device
Returns:
if it is successful formatted as follows |db_column_name (db_column_type):db_column_value|

if it is successful db_column_type is I for int and C for char*

Exceptions:
CONFDBEXCEPTION : "NO_ROWS_SELECTED", if no matching entry in the table has been found .

string CONFDB::PyGetPortRow_pid string  sysname,
int  dID
 

Get the port row in port_row_result, returning a string .

Parameters:
sysname : name of the subsystem
dID : portID of the device
Returns:
case of success formatted as follows |db_column_name (db_column_type):db_column_value|

db_column_type is I for int and C for char*

Exceptions:
CONFDBEXCEPTION : "NO_ROWS_SELECTED", if no matching entry in the table has been found .

string CONFDB::PyInsertCompositeLinkType string  sysname,
string  lktype,
string  lktype_list_concan,
int  last
 

Insert a Composite Link Type, returning a string .

Parameters:
sysname : name of the subsystem
lktype : name of the link type (such as "Mixed_Data")
lktype_list_concan : name of the link types which compose the composite links, separated by ","
lktype_list_concan :ex. Mixed_Data is composed of HLT_Data and L1_Data, so simple_lk_list="HLT_Data,L1_Data"
last : 1 if it's your last insert (save it into the database), 0 otherwise
Returns:
"Successful insertion" if it is successful,
Exceptions:
CONFDBEXCEPTION 

string CONFDB::PyInsertDevice string  sysname,
string  devname,
string  devtype,
int  dnode,
int  promismode,
int  nused,
string  duuid,
string  dbcode,
int  last
 

Insert a device returning a string .

Parameters:
sysname : name of the subsystem
devname : name of the device
devtype : name of the devicetype
dnode : 1 if it's a host node (usually starts or ends a path such as L1FEs) , 0 otherwise.
promismode : 1 if put in this mode (default mode), 0 otherwise
nused : 1 if this node is used in the configuration, 0 otherwise
duuid : uuid of the device
dbcode : barcode of the device
last : 1 if it's your last insert (save it into the database), 0 otherwise
Returns:
"Successful insertion" if it is successful,
Exceptions:
CONFDBEXCEPTION 

string CONFDB::PyInsertDeviceType string  sysname,
string  devtype,
int  nb_in,
int  nb_out,
string  devdescr,
int  last
 

Insert a device type , returning a string .

Parameters:
sysname : name of the subsystem
devtype : name of the devicetype
nb_in : nb of input ports
nb_out : nb of output ports
devdescr : some description about the component max size 500 characters.
last : 1 if it's your last insert (save it into the database), 0 otherwise
Returns:
"Successful insertion" if it is successful,
Exceptions:
CONFDBEXCEPTION 

string CONFDB::PyInsertLink string  sysname,
string  nfrom,
string  nto,
int  pfrom,
int  pto,
int  lk_used,
string  lk_type,
int  bidirectional,
string  tklink,
int  lk_tk,
int  last
 

Insert Link returning a string .

Parameters:
sysname : name of the subsystem
nfrom : name of the device starting the link
nto : name of the device ending the link
pfrom : port nb of the device from
pto : port nb of the device to
lk_used : 1 if the link is used in the configuration, 0 otherwise
lk_type : name of the link type
bidirectional : 1 if it's a bidirectional link, 0 otherwise
tklink : trunk link address if the link is part of an link aggregation, put "none", otherwise.
lk_tk : 0 if the link is NOT truncated, otherwise 1.
last : 1 if it's your MultipleLink last insert (save it into the database), 0 otherwise
Returns:
"Successful insertion" if it is successful,
Exceptions:
CONFDBEXCEPTION 

string CONFDB::PyInsertMacIP string  sysname,
string  eth_add,
string  ipadd,
string  submask,
string  vlan,
string  IPname,
int  lkagg,
string  dname,
int  ptnb,
int  last
 

Insert a MAC entry, returning a string .

Parameters:
sysname : name of the subsystem
eth_add 
ipadd 
submask 
vlan 
IPname 
lkagg :1 if the link is aggregated, 0 otherwise
dname : name of the device
ptnb : port nb
last : 1 if it's your last insert (save it into the database), 0 otherwise
Returns:
"Successful insertion" if it is successful,
Exceptions:
CONFDBEXCEPTION 

string CONFDB::PyInsertMultipleCompositeLinkTypes string  sysname,
string  lktype,
string  lktype_list_concan,
int  first,
int  last
 

Insert a Composite Link Type, returning a string .

Parameters:
sysname : name of the subsystem
lktype : name of the link type (such as "Mixed_Data")
lktype_list_concan : name of the link types which compose the composite links, separated by ","
lktype_list_concan :ex. Mixed_Data is composed of HLT_Data and L1_Data, so simple_lk_list="HLT_Data,L1_Data"
first : 1 if it's your CompositeLinkType first insert (save it into the database), 0 otherwise
last : 1 if it's your CompositeLinkType last insert (save it into the database), 0 otherwise
Returns:
"Successful insertion" if it is successful,
Exceptions:
CONFDBEXCEPTION 

string CONFDB::PyInsertMultipleDevices string  sysname,
string  devname,
string  devtype,
int  dnode,
int  promismode,
int  nused,
string  duuid,
string  dbcode,
int  first,
int  last
 

Insert a device returning a string .

Parameters:
sysname : name of the subsystem
devname : name of the device
devtype : name of the devicetype
dnode : 1 if it's a host node (usually starts or ends a path such as L1FEs) , 0 otherwise.
promismode : 1 if put in this mode (default mode), 0 otherwise
nused : 1 if this node is used in the configuration, 0 otherwise
duuid : uuid of the device
dbcode : barcode of the device
first : 1 if it's your first MultipleDevice insert (save it into the database), 0 otherwise
last : 1 if it's your MultipleDevice last insert (save it into the database), 0 otherwise
Returns:
"Successful insertion" if it is successful,
Exceptions:
CONFDBEXCEPTION 

string CONFDB::PyInsertMultipleDeviceTypes string  sysname,
string  devtype,
int  nb_in,
int  nb_out,
string  devdescr,
int  first,
int  last
 

Insert a device type , returning a string .

Parameters:
sysname : name of the subsystem
devtype : name of the devicetype
nb_in : nb of input ports
nb_out : nb of output ports
devdescr : some description about the component max size 500 characters.
first : 1 if it's your MultipleDeviceType first insert (save it into the database), 0 otherwise
last : 1 if it's your MultipleDeviceType last insert (save it into the database), 0 otherwise
Returns:
"Successful insertion" if it is successful,
Exceptions:
CONFDBEXCEPTION 

string CONFDB::PyInsertMultipleLinks string  sysname,
string  nfrom,
string  nto,
int  pfrom,
int  pto,
int  lk_used,
string  lk_type,
int  bidirectional,
string  tklink,
int  lk_tk,
int  first,
int  last
 

Insert Multiple Link returning a string .

Parameters:
sysname : name of the subsystem
nfrom : name of the device starting the link
nto : name of the device ending the link
pfrom : port nb of the device from
pto : port nb of the device to
lk_used : 1 if the link is used in the configuration, 0 otherwise
lk_type : name of the link type
bidirectional : 1 if it's a bidirectional link, 0 otherwise
tklink : trunk link address if the link is part of an link aggregation, put "none", otherwise.
lk_tk : 0 if the link is NOT truncated, otherwise 1.
first : 1 if it's your MultipleLink first insert (save it into the database), 0 otherwise
last : 1 if it's your MultipleLink last insert (save it into the database), 0 otherwise
Returns:
"Successful insertion" if it is successful,
Exceptions:
CONFDBEXCEPTION 

string CONFDB::PyInsertMultipleMacIPs string  sysname,
string  eth_add,
string  ipadd,
string  submask,
string  vlan,
string  IPname,
int  lkagg,
string  dname,
int  ptnb,
int  first,
int  last
 

Insert a MAC entry, returning a string .

Parameters:
sysname : name of the subsystem
eth_add 
ipadd 
submask 
vlan 
IPname 
lkagg : 1 if the link is aggregated, 0 otherwise
dname : name of the device
ptnb : port nb
first : 1 if it's your first MacIP insert (save it into the database), 0 otherwise
last : 1 if it's your last MacIP insert (save it into the database), 0 otherwise
Returns:
"Successful insertion" if it is successful,
Exceptions:
CONFDBEXCEPTION 

string CONFDB::PyInsertMultiplePorts string  sysname,
string  devname,
int  ptnb,
vector< int >  param_list,
string  pwiresense,
string  pphy,
int  first,
int  last
 

Insert Multiple Ports,returning a string .

Parameters:
sysname : name of the subsystem
devname : name of the device
ptnb : port nb of the device
param_list : vector of int which must be filled as follows
param_list[0] : corresponds to rxfc 1 if you allow receiver flow control, 0 otherwise
param_list[1] : corresponds to txfc : 1 if you allow transceiver flow control, 0 otherwise
param_list[2] : corresponds to speed1 : speed of the port
param_list[3] : corresponds to speed2 : speed of the port (second possible)
param_list[4] : corresponds to speed3 : speed of the port (third possible)
param_list[5] : corresponds to force_speed : 1 if you allow the force speed option, 0 otherwise
param_list[6] : corresponds to bmc_booting : 1 if the port is the bmc_booting one, 0 otherwise
param_list[7] : corresponds to primary_interface : (0 or 1), 1 if the port is the primary interface
param_list[8] : corresponds to traffic_type_supported : (0 or 1), 1 if the port is independant of the type of data (i.e. it can support for instance L1 data or HLT data)
param_list[9] : corresponds to port_management : 1 if it's a management port
pwiresense : possible values :"SWITCH/SWITCH","AUTOSENSE","SWITCH/COMPUTER"
pphy,: possible values :"SX","T","SL"
first : 1 if it's your first Port insert (save it into the database), 0 otherwise
last : 1 if it's your last Port insert (save it into the database), 0 otherwise
Returns:
"Successful insertion" if it is successful,
Exceptions:
CONFDBEXCEPTION 

string CONFDB::PyInsertMultipleSimpleLinkTypes string  sysname,
string  lktype,
int  first,
int  last
 

Insert a Simple Link Type, returning a string .

Parameters:
sysname : name of the subsystem
lktype : name of the link type
first,: 1 if it's your SimpleLinkType first insert (save it into the database), 0 otherwise
last,: 1 if it's your SimpleLinkType last insert (save it into the database), 0 otherwise
Returns:
"Successful insertion" if it is successful,
Exceptions:
CONFDBEXCEPTION 

string CONFDB::PyInsertPort string  sysname,
string  devname,
int  ptnb,
vector< int >  param_list,
string  pwiresense,
string  pphy,
int  last
 

Insert Ports, returning a string .

Parameters:
sysname : name of the subsystem
devname : name of the device
ptnb : port nb of the device
param_list,: vector of int which must be filled as follows
param_list[0] : corresponds to rxfc 1 if you allow receiver flow control, 0 otherwise
param_list[1] : corresponds to txfc : 1 if you allow transceiver flow control, 0 otherwise
param_list[2] : corresponds to speed1 : speed of the port
param_list[3] : corresponds to speed2 : speed of the port (second possible)
param_list[4] : corresponds to speed3 : speed of the port (third possible)
param_list[5] : corresponds to force_speed : 1 if you allow the force speed option, 0 otherwise
param_list[6] : corresponds to bmc_booting : 1 if the port is the bmc_booting one, 0 otherwise
param_list[7] : corresponds to primary_interface : (0 or 1), 1 if the port is the primary interface
param_list[8] : corresponds to traffic_type_supported : (0 or 1), 1 if the port is independant of the type of data (i.e. it can support for instance L1 data or HLT data)
param_list[9] : corresponds to port_management : 1 if it's a management port
pwiresense : possible values :"SWITCH/SWITCH","AUTOSENSE","SWITCH/COMPUTER"
pphy,: possible values :"SX","T","SL"
last : 1 if it's your last Port insert (save it into the database), 0 otherwise
Returns:
"Successful insertion" if it is successful,
Exceptions:
CONFDBEXCEPTION 

string CONFDB::PyInsertSimpleLinkType string  sysname,
string  lktype,
int  last
 

Insert a Simple Link Type, returning a string .

Parameters:
sysname : name of the subsystem
lktype : name of the link type
last : 1 if it's your last insert (save it into the database), 0 otherwise
Returns:
"Successful insertion" if it is successful,
Exceptions:
CONFDBEXCEPTION 

vector< string > CONFDB::PyLoadConnectivityTable string  systemname  ) 
 

Load the connectivity table of a given system , returning a vector of strings

Parameters:
systemname : name of the subsystem.
Returns:
the list of links formatted as follows:linkid|node_from|node_to|port_from|port_to|bidirectional|link_used|linktype
Exceptions:
CONFDBEXCEPTION : "NO_ROWS_SELECTED", if no matching entry in the table has been found.

vector< string > CONFDB::PyLoadDeviceTypeTable string  systemname  ) 
 

Get all the device types of a given system , returning a vector of strings

Parameters:
systemname : name of the subsystem.
Returns:
the list of device types
Exceptions:
CONFDBEXCEPTION : "NO_ROWS_SELECTED", if no matching entry in the table has been found .

vector< string > CONFDB::PyLoadLinkTypeTable string  systemname  ) 
 

Load the link type table of a given system , returning a vector of strings

Parameters:
systemname : name of the subsystem.
Returns:
the list of linkname/linkid formatted as follows:linkid|linkname
Exceptions:
CONFDBEXCEPTION : "NO_ROWS_SELECTED", if no matching entry in the table has been found .

vector< string > CONFDB::PyMatchDeviceIDDeviceName string  systemname  ) 
 

Load part of the device table of a given system , returning a vector of strings

Parameters:
systemname : name of the subsystem.
Returns:
the list of devicename/deviceid formatted as follows:deviceid|devicename
Exceptions:
CONFDBEXCEPTION : "NO_ROWS_SELECTED", if no matching entry in the table has been found .


Member Data Documentation

string CONFDB::_dbname [private]
 

string CONFDB::_login [private]
 

string CONFDB::_passwd [private]
 


The documentation for this class was generated from the following files:
Generated on Wed Nov 2 15:28:51 2005 for confDBpython by  doxygen 1.4.4