Get the implementation that uses comms working so that tests pass.
Will enable by default in a separate commit.

Change-Id: I38e0642fe5f1e87cbbb624ff68ec8276f2e92704
Signed-off-by: Rob Adams <readams@readams.net>
Add support for generating libopflex RPM on suitable platforms with
make rpm.

Change-Id: I3e19c440db1aa54129ebe6561a0c5347883363ce
Signed-off-by: Rob Adams <readams@readams.net>
Add support for generating RPM packages to the generated model output.

Change-Id: Ibfcd8e27d85808d60cab2fd256867c04375d3207
Signed-off-by: Rob Adams <readams@readams.net>
Implement reconciling flows when connection to switch is established

When the agent starts up, or after it reconnects to the switch, one
cannot guarantee that the flows present on the switch are in line
with those expected by the state of MODB objects. The purpose of this
change is to ensure that the flows are sync-ed up. The flow-manager
has another modes of operation now, called "syncing", whereby only
the cached table state is updated in response to MODB notifications;
the normal mode of execution is to update both the cached state and
flows on the switch. When connection is established to the switch,
flow-manager transitions to syncing and also starts reading the current
flows and groups present on the switch. Once all flows are read,
it compares them with the cached state and executes modifications
on the switch to eliminate the differences. Once these are complete,
normal execution mode resumes.
To simply the interaction between different callbacks, I've introduced
a work-queue. Event notifications from MODB and connection events
just enqueue a work-item for execution later.
Flows in the learning table that are learnt reactively are not synced
by this process because they have an idle timeout.

Change-Id: I69376c30c711a523c55491708d71896eddfa12d6
Signed-off-by: Amit Bose <bose@noironetworks.com>
close TCP handle when connection doesn't go through

Change-Id: I1367566b724a5cbdd6df4b32dc55198ad62e43aa
Signed-off-by: Alessandro Salvatori <sandr8@gmail.com>
Do a better comparisons of flow groups when reconciling

Change-Id: I70204e0bef24f35185736aa2e83c299e16e47643
Signed-off-by: Amit Bose <bose@noironetworks.com>
close pending handles on behalf of the user upon finiLoop, assert in debug builds

Change-Id: I623f4ebfcb71d2c235abf22d47f497124532b6b8
Signed-off-by: Alessandro Salvatori <sandr8@gmail.com>
add debugs for state change callbacks in comms tests

Change-Id: I9fe034ece06275f5e24aeda8698970a73d9a2e1b
Signed-off-by: Alessandro Salvatori <sandr8@gmail.com>
don't trace Peer's and Peer::LoopData's operator<<

Change-Id: Idf9e016eab61607080b5b91f5c294619ad544d37
Signed-off-by: Alessandro Salvatori <sandr8@gmail.com>
re-declare all comms tests as stable

Change-Id: Ie5980f4e571d9b15218b5e2fd31f1fe1e0de3541
Signed-off-by: Alessandro Salvatori <sandr8@gmail.com>
Add support for generating agent-ovs RPMS on suitable platforms.
  * Remove dependency on boost::log needed for RHEL7
  * Fix a number of compiler warnings
  * Add spec file and systemd unit file for RHEL7
  * Some tweaks for libopflex spec file

Change-Id: I02c29e34db89f263e13e5d2d772fb6f4d84426a3
Signed-off-by: Rob Adams <readams@readams.net>
Set format value properly while setting packet-in format

The format value is expected in big-endian, so OVS was responding
with OFPBRC_EPERM to set packet-in format requests.

Change-Id: I49b65fa96c5aad8c3b26874a6e364d3dcf64f19e
Signed-off-by: Amit Bose <bose@noironetworks.com>
Add extension model for supporting SPAN/ERSPAN

Change-Id: I145e5da3a4c227aa6289542bf6e76479ae4de88a
Signed-off-by: Tom Flynn <tom.flynn@gmail.com>
Persist IDs used to represent objects in flow-rules

Adds simple file-based persistence of ID assignements.

Change-Id: I47071c4b8519da45ac435aa5e0aeaa3d072d4456
Signed-off-by: Amit Bose <bose@noironetworks.com>
Log messages from libopflex using the fallback log handler
Add dependency on boost-devel in libopflex spec file

Change-Id: Id585ad3e19809c79856f368834ce487140d720ba
Signed-off-by: Rob Adams <readams@readams.net>
Make endpoint sources support policy-space-name + endpoint-group-name
in addition to the endpoint-group URI.

Change-Id: I5754ab78c70b923c077011dada3dde7cce2a6ae5
Signed-off-by: Rob Adams <readams@readams.net>
Add Restart=always to opflex agent unit file to enable systemd watchdog.

Change-Id: Idcc7d7788902fc0c0ef971d199f32705ae3c64f3
Signed-off-by: Rob Adams <readams@readams.net>
Move log message when ID file is not initially present to DEBUG
Add magic number and file format version to header for ID file

Change-Id: If4b0bfd7f4f49d1c259c6b75c019b2da81dda374
Signed-off-by: Rob Adams <readams@readams.net>
make sure we retry a client also when we are completely unloaded

Change-Id: I5d5991d52a92fcf22ed4ef41bb6d47265cf1509c
Signed-off-by: Alessandro Salvatori <sandr8@gmail.com>
test for multiple retry attemps when single client and no other load

Change-Id: Icb384ee940337e56a33a62b08949ddde1ab9fdff
Signed-off-by: Alessandro Salvatori <sandr8@gmail.com>