|
The Assimilation Monitoring Project
|
Public Member Functions | |
| def | __init__ |
| def | initglobal |
| def | delete_all |
| def | node_new |
| def | new_ring |
| def | new_drone |
| def | new_switch |
| def | new_nic |
| def | new_IPaddr |
| def | new_ipproc |
| def | new_tcpipport |
| def | empty |
Data Fields | |
| db | |
| dbversion | |
Static Public Attributes | |
| string | NODE_nodetype = 'nodetype' |
| Indexes: ringindex - index of all Ring objects [nodetype=ring] droneindex - index of all Drone objects [nodetype=drone] ipindex - index of all IP address objects [nodetype=ipaddr] macindex - index of all interfaces by MAC address [nodetype=nic]. | |
| string | NODE_ring = 'Ring' |
| string | NODE_drone = 'Drone' |
| string | NODE_switch = 'Switch' |
| string | NODE_NIC = 'NIC' |
| string | NODE_ipaddr = 'IPaddr' |
| string | NODE_ipproc = 'tcp-process' |
| string | NODE_tcpipport = 'IP:tcpport' |
| string | REL_isa = 'IS_A' |
| string | REL_nicowner = 'nicowner' |
| string | REL_wiredto = 'wiredto' |
| string | REL_iphost = 'iphost' |
| string | REL_ipowner = 'ipowner' |
| string | REL_parentring = 'parentring' |
| string | REL_baseip = 'baseip' |
| string | REL_ipphost = 'ipphost' |
| string | REL_tcpservice = 'tcpservice' |
| string | REL_runningon = 'runningon' |
| string | REL_tcpclient = 'tcpclient' |
| debug = False | |
| dictionary | nodetypes |
| list | indices = [key for key in nodetypes.keys() if nodetypes[key]] |
| list | nodetypeindex = self.indextbl['nodetype'] |
| tuple | nodezero = self.db.get_node(0) |
| tuple | top |
| def cma::cma::CMAdb::__init__ | ( | self, | |
host = 'localhost', |
|||
port = 7474 |
|||
| ) |
| def cma::cma::CMAdb::new_IPaddr | ( | self, | |
| nic, | |||
| ipaddr, | |||
| kw | |||
| ) |
| def cma::cma::CMAdb::new_ipproc | ( | self, | |
| name, | |||
| jsonobj, | |||
| drone | |||
| ) |
| def cma::cma::CMAdb::new_nic | ( | self, | |
| nicname, | |||
| macaddr, | |||
| owner, | |||
| kw | |||
| ) |
| def cma::cma::CMAdb::new_ring | ( | self, | |
| name, | |||
parentring = None, |
|||
| kw | |||
| ) |
| def cma::cma::CMAdb::new_tcpipport | ( | self, | |
| name, | |||
| isserver, | |||
| jsonobj, | |||
| dronenode, | |||
| ipproc, | |||
| ipaddrnode | |||
| ) |
| def cma::cma::CMAdb::node_new | ( | self, | |
| nodetype, | |||
| nodename, | |||
unique = True, |
|||
| properties | |||
| ) |
Possibly creates a new node, puts it in its appropriate index and creates an IS_A
relationship with the nodetype object corresponding its nodetype.
It is created and added to indexes if it doesn't already exist in its corresponding index
- if there is one.
If it already exists, the pre-existing node is returned.
If this object type doesn't have an index, it will always be created.
Note that the nodetype has to be in the nodetypetable - even if it's NULL
(for error detection).
The IS_A relationship may be useful -- or not. Hard to say at this point...
cma::cma::CMAdb::debug = False [static] |
list cma::cma::CMAdb::indices = [key for key in nodetypes.keys() if nodetypes[key]] [static] |
string cma::cma::CMAdb::NODE_drone = 'Drone' [static] |
string cma::cma::CMAdb::NODE_ipaddr = 'IPaddr' [static] |
string cma::cma::CMAdb::NODE_ipproc = 'tcp-process' [static] |
string cma::cma::CMAdb::NODE_NIC = 'NIC' [static] |
string cma::cma::CMAdb::NODE_nodetype = 'nodetype' [static] |
Indexes: ringindex - index of all Ring objects [nodetype=ring] droneindex - index of all Drone objects [nodetype=drone] ipindex - index of all IP address objects [nodetype=ipaddr] macindex - index of all interfaces by MAC address [nodetype=nic].
Node types [nodetype enumeration values]:
string cma::cma::CMAdb::NODE_ring = 'Ring' [static] |
string cma::cma::CMAdb::NODE_switch = 'Switch' [static] |
string cma::cma::CMAdb::NODE_tcpipport = 'IP:tcpport' [static] |
list cma::cma::CMAdb::nodetypeindex = self.indextbl['nodetype'] [static] |
dictionary cma::cma::CMAdb::nodetypes [static] |
{
CMAdb.NODE_ring: True
, CMAdb.NODE_drone: True
, CMAdb.NODE_switch: True
, CMAdb.NODE_NIC: True # NICs are indexed by MAC address
# MAC addresses are not always unique...
, CMAdb.NODE_ipaddr: True # Note that IPaddrs also might not be unique
, CMAdb.NODE_tcpipport: True # We index IP and port - handy to have...
, CMAdb.NODE_ipproc: False
}
tuple cma::cma::CMAdb::nodezero = self.db.get_node(0) [static] |
string cma::cma::CMAdb::REL_baseip = 'baseip' [static] |
string cma::cma::CMAdb::REL_iphost = 'iphost' [static] |
string cma::cma::CMAdb::REL_ipowner = 'ipowner' [static] |
string cma::cma::CMAdb::REL_ipphost = 'ipphost' [static] |
string cma::cma::CMAdb::REL_isa = 'IS_A' [static] |
string cma::cma::CMAdb::REL_nicowner = 'nicowner' [static] |
string cma::cma::CMAdb::REL_parentring = 'parentring' [static] |
string cma::cma::CMAdb::REL_runningon = 'runningon' [static] |
string cma::cma::CMAdb::REL_tcpclient = 'tcpclient' [static] |
string cma::cma::CMAdb::REL_tcpservice = 'tcpservice' [static] |
string cma::cma::CMAdb::REL_wiredto = 'wiredto' [static] |
tuple cma::cma::CMAdb::top [static] |