Mark's networking code

As cleaned up by @ediosyncratic using git filter-branch (among other dangerous tools).
Includes several fixups from later in the branch, but I may have missed some.
Compiled locally and passes all unit and acceptance tests.  Let's see how it fares more widely ...

I suspect reviewing the gross diff is easiest, as there are (even after squashing out a few) quite a lot of changes of mind along the way.  Also: 106 commits.
Seems reasonable

On 15/07/14 14:08, Volker Hilsheimer wrote:
>
> In cf-agent/verify_networks.c:
>
> > +    }
> > +
> > +    PromiseResult result = PROMISE_RESULT_NOOP;
> > +    AssessArpPromise(pp->promiser, &result, ctx, &a, pp);
> > +
> > +    switch (result)
> > +    {
> > +    case PROMISE_RESULT_NOOP:
> > +        cfPS(ctx, LOG_LEVEL_INFO, PROMISE_RESULT_NOOP, pp, a, "Arp promise kept");
> > +        break;
> > +    case PROMISE_RESULT_FAIL:
> > +    case PROMISE_RESULT_DENIED:
> > +    case PROMISE_RESULT_TIMEOUT:
> > +    case PROMISE_RESULT_INTERRUPTED:
> > +    case PROMISE_RESULT_WARN:
> > +        cfPS(ctx, LOG_LEVEL_INFO, result, pp, a, "Arp promise not kept");
>
> To be clear:
>
> |PROMISE_RESULT_NOOP| -> promise was already kept, cf-agent didn't 
> change anything; log level VERBOSE
> |PROMISE_RESULT_CHANGE| -> cf-agent changed the system; log level INFO
> |PROMISE_RESULT_FAIL|, |PROMISE_RESULT_TIMEOUT| etc -> cf-agent saw 
> need to change the system, but failed to do so; log level ERR
>
> This is how it's (reasonably) consistently done in our existing 
> promise types. Compliance reporting will deliver error messages with 
> LOG_LEVEL_ERR to the Enterprise server if a promise is not kept so 
> that $operator can see from within the reports what has gone wrong. 
> INFO or VERBOSE output is not included there.
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/cfengine/core/pull/1837/files#r14930242>.
>

-- 
CTO and Founder CFEngine
Author of In Search Of Certainty: The Science of our Information 
Infrastructure <http://markburgess.org>