The Assimilation Monitoring Project
cma::cma::DroneInfo Class Reference

Public Member Functions

def __init__
def __getitem__
def getport
def setport
def logjson
def add_netconfig_addresses
def add_tcplisteners
def add_tcpipports
def add_linkdiscovery
def primary_ip
def select_ip
def send_hbmsg
def death_report
def start_heartbeat
def stop_heartbeat
def request_discovery
def __str__
def find
def add
def add_json_processors

Data Fields

 io
 node
 port
 status
 reason

Detailed Description

Definition at line 649 of file cma.py.


Constructor & Destructor Documentation

def cma::cma::DroneInfo::__init__ (   self,
  designation,
  node = None,
  kw 
)

Definition at line 653 of file cma.py.


Member Function Documentation

def cma::cma::DroneInfo::__getitem__ (   self,
  key 
)

Definition at line 663 of file cma.py.

def cma::cma::DroneInfo::__str__ (   self)

Definition at line 984 of file cma.py.

def cma::cma::DroneInfo::add (   designation,
  reason,
  status = 'up' 
)

Definition at line 1024 of file cma.py.

def cma::cma::DroneInfo::add_json_processors (   args)

Definition at line 1038 of file cma.py.

def cma::cma::DroneInfo::add_linkdiscovery (   self,
  jsonobj,
  kw 
)

Definition at line 783 of file cma.py.

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 
)

Definition at line 865 of file cma.py.

def cma::cma::DroneInfo::find (   designation)

Definition at line 989 of file cma.py.

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 
)

Definition at line 678 of file cma.py.

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

Definition at line 653 of file cma.py.

Definition at line 653 of file cma.py.

Definition at line 666 of file cma.py.

Definition at line 865 of file cma.py.

Definition at line 865 of file cma.py.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines