Detailed Description
Definition at line 649 of file cma.py.
Constructor & Destructor Documentation
| def cma::cma::DroneInfo::__init__ |
( |
|
self, |
|
|
|
designation, |
|
|
|
node = None, |
|
|
|
kw |
|
) |
| |
Member Function Documentation
| def cma::cma::DroneInfo::__getitem__ |
( |
|
self, |
|
|
|
key |
|
) |
| |
| def cma::cma::DroneInfo::__str__ |
( |
|
self | ) |
|
| def cma::cma::DroneInfo::add |
( |
|
designation, |
|
|
|
reason, |
|
|
|
status = 'up' |
|
) |
| |
| def cma::cma::DroneInfo::add_json_processors |
( |
|
args | ) |
|
| def cma::cma::DroneInfo::add_linkdiscovery |
( |
|
self, |
|
|
|
jsonobj, |
|
|
|
kw |
|
) |
| |
| def cma::cma::DroneInfo::add_netconfig_addresses |
( |
|
self, |
|
|
|
jsonobj, |
|
|
|
kw |
|
) |
| |
Save away the network configuration data we got from JSON discovery.
This includes all our NICs, their MAC addresses, all our IP addresses and so on
for any non-loopback interface. Whee!
In theory we could make a giant 'create' for everything and do all the db creation
in one swell foop - or at most two...
Definition at line 695 of file cma.py.
| def cma::cma::DroneInfo::add_tcpipports |
( |
|
self, |
|
|
|
isserver, |
|
|
|
jsonobj, |
|
|
|
ipproc, |
|
|
|
allourips |
|
) |
| |
We create tcpipports objects that correspond to the given json object in
the context of the set of IP addresses that we support - including support
for the ANY ipv4 and ipv6 addresses
Definition at line 759 of file cma.py.
| def cma::cma::DroneInfo::add_tcplisteners |
( |
|
self, |
|
|
|
jsonobj, |
|
|
|
kw |
|
) |
| |
Add TCP listeners and/or clients. Same or separate messages - we don't care.
Definition at line 742 of file cma.py.
| def cma::cma::DroneInfo::death_report |
( |
|
self, |
|
|
|
status, |
|
|
|
reason, |
|
|
|
fromaddr, |
|
|
|
frameset |
|
) |
| |
| def cma::cma::DroneInfo::find |
( |
|
designation | ) |
|
| def cma::cma::DroneInfo::getport |
( |
|
self | ) |
|
Return the port we talk to this drone on
Definition at line 666 of file cma.py.
| def cma::cma::DroneInfo::logjson |
( |
|
self, |
|
|
|
jsontext |
|
) |
| |
| def cma::cma::DroneInfo::primary_ip |
( |
|
self, |
|
|
|
ring = None |
|
) |
| |
Return the "primary" IP for this host
Definition at line 830 of file cma.py.
| def cma::cma::DroneInfo::request_discovery |
( |
|
self, |
|
|
|
args |
|
) |
| |
Send our drone a request to perform discovery
We send a DISCNAME frame with the instance name
then an optional DISCINTERVAL frame with the repeat interval
then a DISCJSON frame with the JSON data for the discovery operation.
Definition at line 928 of file cma.py.
| def cma::cma::DroneInfo::select_ip |
( |
|
self, |
|
|
|
ring = None |
|
) |
| |
Select an appropriate IP address for talking to a partner on this ring
or our primary IP if ring is None
Definition at line 836 of file cma.py.
| def cma::cma::DroneInfo::send_hbmsg |
( |
|
self, |
|
|
|
dest, |
|
|
|
fstype, |
|
|
|
port, |
|
|
|
addrlist |
|
) |
| |
Send a message with an attached address list and optional port.
This is intended primarily for start or stop heartbeating messages.
Definition at line 847 of file cma.py.
| def cma::cma::DroneInfo::setport |
( |
|
self, |
|
|
|
port |
|
) |
| |
Set the port we talk to this drone on
Definition at line 672 of file cma.py.
| def cma::cma::DroneInfo::start_heartbeat |
( |
|
self, |
|
|
|
ring, |
|
|
|
partner1, |
|
|
|
partner2 = None |
|
) |
| |
Start heartbeating to the given partners.
We insert ourselves between partner1 and partner2.
We only use forward links - because we can follow them in both directions in Neo4J.
So, we need to create a forward link from partner1 to us and from us to partner2 (if any)
Definition at line 887 of file cma.py.
| def cma::cma::DroneInfo::stop_heartbeat |
( |
|
self, |
|
|
|
ring, |
|
|
|
partner1, |
|
|
|
partner2 = None |
|
) |
| |
Stop heartbeating to the given partners.'
We don't know which node is our forward link and which our back link,
but we need to remove them either way ;-).
Definition at line 910 of file cma.py.
Field Documentation
The documentation for this class was generated from the following file: