Fix hostname validation for nameservers

Fixes the hostname validation to align with the RFC's demands[1].
This was done by replacing the full regex with a function that
broke the FQDN into individual components that were easier to
reason about with regular expressions.

Also added several test cases for domains so if someone wants
to convert it back to pure regex there will be better test vectors.

1. RFC 1123 says an all-digit hostname is allowed in section 2.1. It
   says that this more liberal syntax MUST be supported.

Closes-Bug: #1396932
Change-Id: I003cf14d95070707e43e40d55da62e11a28dfa4e
Alter execute_alembic_command() to not assume all commands

Alembic 0.7.1 is adding new diff directives add_fk and remove_fk.
The logic in execute_alembic_command() appears to assume all potential
commands are present in METHODS.   This patch adjusts it so that
it checks METHODS first, allowing the tests in neutron.tests.unit.db.test_migration
to pass.  However, if the design here requires that all potential
Alembic commands are handled, then this would not be the fix,
though I recommend that the potential list of Alembic directives
not be hardcoded.

Change-Id: Ib08685be252e1fdb0f10853f8fc9a7e19ac54a94
Closes-Bug: #1397796
Update i18n translation for Midonet plugin

All the existing LOG.info, LOG.warning, LOG.error and LOG.critical
messages should have _LI, _LW, _LE and _LC respectively. Also, debug
level log shouldn't be translated. This patch set will cover the midonet
directory.

Change-Id: Ic74316640015bc98ec4b2722f4039f58a9ec2379
Partial-Bug: #1320867
Merge "Update i18n translation for Midonet plugin"
Merge "Fix hostname validation for nameservers"
Enforce log hints in opencontrail

This change enforces log hints use and removes debug level log
translation, modifications are validated through a hacking rule
and the change respects loggging guidelines. Validate that hacking
rules apply to directories:- neutron/plugins/opencontrail

Change-Id: I44f215a672c08c7f0046bc026abe7c6a5d1697d1
Partial-bug: #1320867
Merge "Alter execute_alembic_command() to not assume all commands"
Merge "Enforce log hints in opencontrail"