Change fam_blocking default to True

Based on discussion in #bcfg2, the consensus seems to be that the
behavior provided by fam_blocking = True is the least surprising
of the two options (i.e. the server should not process data until
it is ready).  1.4 seems like a good time to make this change.
Add a --no-fam-blocking command-line argument to bcfg2-server

There is a quirk in the configuration parser where a BooleanOption
with default=True will always return false __unless_ a command-line
option is provided.  Not sure why that's the case, but this is a work-
around
Correctly handle config-file-only BooleanOptions which default to True

In Bcfg2.Options.Parser._parse_config_options, if the "default" of the
option (perhaps set by the config file) evaluates to True, then it runs
the actions associated with the option. Otherwise, it just sets the
option to the default directly with setattr.

Since the default of a store_false action is True, the code will run
argparse's _StoreFalseAction function. Well, _StoreFalseAction, is a
subclass of _StoreConstAction where const=False. _StoreConstAction has a
call method which looks like this:

def __call__(self, parser, namespace, values, option_string=None):
    setattr(namespace, self.dest, self.const)

So it completely ignores the value passed in and just sets the value of
the option to const (i.e. False).

Looking at fam_blocking
{None: _StoreFalseAction(option_strings='fam_blocking',
dest='fam_blocking', nargs=0, const=False, default=True, type=None,
choices=None, help='FAM blocks on startup until all events are
processed', metavar=None)}
start phase 3
fam_blocking config val is True
start phase 3
_parse_config_options: fam_blocking default is True
_parse_config_options: calling argparse.<class
'argparse._StoreFalseAction'> with value True on fam_blocking
_parse_config_options: after calling argparse.<class
'argparse._StoreFalseAction'> fam_blocking is False
after _parse_config_options fam_blocking is False
after phase 3 fam_blocking is False
after phase 4 fam_blocking is False
end of parser fam_blocking is False
CLI init fam_blocking is False

So how to fix it? Define a new Action? That seems like the most direct
approach since the problem really is that _StoreFalseAction does what it
says on the tin, it stores false no matter what.

The new action BooleanOptionAction works like store_true and store_false,
except that it stores the value that was passed in, or the default if there
was no value passed in.
Include the new Options module in the bcfg2 package

Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
debian/control: Move python-genshi from Suggests to Depends to match current needs

Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
Use setdefault instead of a conditional
Merge pull request #180 from fennm/default-fam_blocking-to-true

Default fam blocking to true
Options: Fix default "Log to syslog" value

This changes makes the default value match what is specified by the
documentation.

Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
Client: add --only-important command line option

Add the new --only-important (-i) command line option. With this option
bcfg2 will only configure the important entries and exits clean
afterwards.
Client: fix handling of important entries

The condition of the if should match the case, if the entry should be
skipped.
Client: support dryrun mode and only-important

Add support for displaying the skipped entries in dryrun mode when using
the --only-important command line flag.
Client: Fix client cache for py3k

Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
Reporting: do not duplicate isstale functionality

The interaction entries have a isstale() method, we do not need a
template tag, that tries to figure out this on its own. The isstale()
method works even better: It knows, if the interaction is the current
interaction and compares the timestamp to the current time or (if it is
not the current one) it compares the timestamp to the timestamp of the
next interaction. So using the method of the model, you can browse the
interaction history and see, if the host was stale some time in the
past. Previously all interactions more than 24h ago were marked stale.
Merge pull request #185 from AlexanderS/only-important

Add only important flag