Reloacte input.xml parsing in seperate class

Before this change the parsing of input.xml was done inside
the __init__ method of RestServer.  This change moves this
parsing into a CommandRegistry class which calles insert_instance
on the RestServer to record new commands.

The intention is to refactor this such that CommandRegistry
provides a base class for reading input.xml.  Through the use
of callbacks and helper classes this will allow different
command registries to be populated.

Change-Id: I6ad786c6dfbe9e7e148572db08f1c78e04d1d7f8
Reviewed-By: Gabor Gombas <Gabor.Gombas@morganstanley.com>
Refactor order and minor variable changes to resources.py

Change-Id: I8f9d78319ecb1dfad044e8d9922e9788458dc311
Reviewed-By: Gabor Gombas <Gabor.Gombas@morganstanley.com>
Extend CommandRegistry to handle argument parsing and processing

This change intorduces the concept of a CommandEntry; which is created for
each command transport in input.xml by the CommandRegistry.

The CommandRegistry uses its methods new_entry and add_entry to create new
CommandEntry's and add them to the registry (RestServer in this case).  The
intension is that this can later be abstracted to allow for other storage
classes.

The CommandRegistry invokes add_option and add_format for each option and
format it finds for a given command.  This moves the processing logic from
the CommandRegistry into the CommandEntry.  Longer term the intention is to
abstract the CommandEntry into a base class.

The check_arguments function from RestServer has also been incorporated, as
it how has all the information it requires in the CommandEntry.  This required
a small change to the request handeling.

Change-Id: Idfbb76503e171b9af60bbd7ffe3df0ad33253bc5
Reviewed-By: Gabor Gombas <Gabor.Gombas@morganstanley.com>
Seperate input.xml parsing from semantic actions on RestServer

This change seperates the current usage of these data in input.xml by
RestServer into a subclass of CommandRegistry and CommandEntry.  This
leaves CommandRegistry and CommandEntry containing only generic parsing
code.

The classes ResourcesCommandRegistry (which populates RestServer) and
ResourcesCommandEntry (which locates instances of BrokerCommand) now
contain all of the parsing logic.

Change-Id: I4caacfef3bbeb32b8198ae94a8ea2631dc6e461f
Reviewed-By: Gabor Gombas <Gabor.Gombas@morganstanley.com>
Only export the primary IP if there is one

If we don't know the primary IP of the host (e.g. because it uses
dynamic DHCP), then we should not set /system/network/primary_ip to
"None".

Change-Id: Icd2802b22729ec4230950b893fdafb9c01621b94
Fix mixing server and client service options

"aq search host --server_of_service bootserver --instance ny-prod"
caused the service_instance table to be joined twice, without aliasing.

Change-Id: Ib21e1f863367674e8e7a3534d92a8481c2ca031d
Bump the version of Java and Ant

Change-Id: Icae85d376d033cbe7387cdde6164fe478ce14257
User synchronization fixes

Bugs fixed:

- On the second sync, the user name was changed to the full name
- Users were not deleted in the absence of root grants
- Missing unique index on UID
- "show_user --all" returned Unicode literals instead of strings

Addresses-Issue: Jira/AQUILON-1845
Change-Id: Ia97a4c0a2167a20292fb0787e6f4b5873dd48b65
Convert user synchronization to a class

Having a place to store internal state is useful.

Change-Id: Ia78ee0f74218ae9cf3e8039adbd6959d2f8ffb72
Introduce helper functions for user refresh

This makes the core logic easier to read, and also makes the following
commit simpler.

Change-Id: I072a909f8e5937ffc68139df1a244f3a79b67c7c
Add incremental mode to refresh_user

Change-Id: I7a1c72030e176e008becd1d0bce18b3a12b26517
Cleanup: drop package renamings

Change-Id: Iebc49653ccb431f6c9800dbb11896f31d7b6bcb2
Get rid of some unneeded config variables

Change-Id: I8e6e9c6d9acac300d203b679ca3e7fce2c32a992
Clean up db_factory.py

Drop the safe_execute wrapper, since it was not very useful. Use
SQLAlchemy introspection to get the list of table names. Drop checks
about using the production database.

Change-Id: I06c0b889ab11ed0c2e6e328e736285c93575f632
Cleanup module loading

Stop loading the CheckNet module. The database module (if needed) is
loade by DbFactory, so no need to duplicate that in the plugin. On the
other hand, add a bit more logging to DbFactory.

Change-Id: I584d0a3ff2075c24f4e32830d220c28c5aa6d6a1
aq_notifyd: move DB connect after logging setup

So problems related to DB connection get logged in the log file.

Change-Id: I492d00029e3c376d220a0998144f3f1831e8d7c7
DbFactory cleanups

Make the pool settings optional, and move them out from the general
[database] section to better reflect the fact that SQLite does not use
these settings. Add support for setting pool_recycle since it's trivial
and someone may find it useful.

Move event registration out of the login() method to reduce the number
of places we care about the exact DB backend. Register the events for
the Pool class, to make sure they apply to the very first DB connection.

Integrate _get_password_list() into login(), since that was the only
caller, and this way we can avoid some redundant error checks.

Drop the dsn and meta attributes because they're redundant. Use
SQLAlchemy utilities for parsing the dsn.

Change-Id: Ia0e948f1d1487dad431e488b84ef52fb0cd5d037
Fix authorization rules for reconfigure

Roles allowed to run "reconfigure" should also be allowed to run
"reconfigure --list" and "reconfigure --membersof".

Change-Id: Id7f94014f7d66a8687174d382b767d917f38b388
Addresses-Issue: Jira/AQUILON-1860
Merge remote-tracking branch 'origin/for_next/command_registry'

Conflicts:
	lib/aquilon/worker/resources.py

Change-Id: I9fc532c30588f35b3ed01901026ee227e399708e
Merge remote-tracking branch 'origin/gombgabo/for_review/bump_java'