Enclose command args in with_venv.sh

Change-Id: I6d2ca2f8fca951fe2d90265da8728438dd7d7567
Closes-Bug: #1220937
Move declaration of int_br_device_count earlier

_report_state is being called by setup_rpc so int_br_device_count needs
to be initialized earlier. To avoid
AttributeError: object has no attribute 'int_br_device_count'

This wasn't caught by unit tests for 3 separate reason
o The reference to self.int_br_device_count is wrapped in
  except Exception: log / pass
- This reference has been moved outside of the try/except

o Unit tests set report_interval to 0 so the heartbeat wasn't called
  during unit tests.
- now removed

o The function passed into FixedIntervalLoopingCall isn't started
  anyways so wasn't calling self._report_state
- replaced FixedIntervalLoopingCall with a mock that calls the
  function once.

Fixes bug #1221054

Change-Id: I572af4ee017c1f7f016c8f9981ca54d1301442d1
Fix incorrect NotImplementedError

neutron.common.exceptions doesn't define NotImplementedError, but
some codes still use it. We should use builtin
exceptions.NotImplementedError instead.

Note: this patch also fixes a never run code in nvp.

Closes-Bug: #1221500
Change-Id: I5f367ab5edc1e7fbbc2e4eba5fe36d148d4d062d
Mock midonetclient in test_midonet_lib

Change-Id: Idb4de82c193b2f2589131b06bad04bc858499a21
Closes-bug: #1221674
Make neutron.common.log.log print module path

Closes-Bug: #1221663

neutron.common.log.log is useful for logging arguments of a method.
It outputs class name and method name, but module path is not output.
A module path is useful to search the log message.

Change-Id: Ic2903da750cc13980d5cdee153bb079f7d4ee122
Prevents 400 NVP errors caused by a None display_name

The API forbids a resource name to be None, but the
Model does not. Such errors may  be induced by
programming directly against the plugin interface. With
this fix we avoid raising 400 faults which may be introduced
by involuntary programming errors.

Fixes bug 1221896

Change-Id: Ic1201c5af5691f2bed38753453f73c229858b10f
Fix IF checks on spawned green thread instance

Initially the symptom looks like race condition between two threads when
stopping the task manager. After further analysis/troubleshooting, it
turns out that two threads are spawned if a task manager is stopped and
started again, causing unexpected errors.

The IF check on the spawned thread sometimes return True sometime return False
if not compared against None explicitly. This makes start() method
think no thread has been started or stop() method think no thread is started.
Change the check to compare against None.

Also fixed a problem in unit-test where a thread may never terminated when
a stop call is invoked during db access.

Closes-Bug: 1221486
Change-Id: I0d67bfe8fef7a390f0d6bc0f5a42835f86a9fb27
Merge "Mock midonetclient in test_midonet_lib"
Imported Translations from Transifex

Change-Id: I4602704b4a4f1be5a49f1431eebd58072dfb7704
Merge "Fix IF checks on spawned green thread instance"
Merge "Imported Translations from Transifex"
Merge "Enclose command args in with_venv.sh"
Enhance unittest for hyperv_neutron_agent

Change-Id: Idc726ba668eba56a64dc498b49ec0e5e397590b5
Fix message i18n error

Partial-Bug: #1217100

Using tools/check_i18n.py to scan source directory, and fix most of
the errors.

- Message internationalization
- First letter must be capital
- Using comma instead of percent in LOG.xxx

Note: all extension's description are not touched in this patch,
can be fixed after discussing.
Note: all nicira/check_nvp_config.py print messages are not fixed.

Change-Id: I79ef06fd42f6780beb5019c592662536c2a51864
Imported Translations from Transifex

Change-Id: I3f069fcb0ff5645581152ca33d12ed802d0779e5
LBaaS: Fix healthmonitor disassociation for non-admin

Due to specifics of policy engine, checked object should have
tenant_id to be checked by rule admin_or_owner.
In 'disassociate' operation neutron API layer works with
PoolHealthMonitorAssociation which doesn't have tenant_id field.
Need to add it to resulting dict returned by get_pool_health_monitor.

Change-Id: I6c58558b09ff34dedd7da30866275de44d3ba993
Closes-bug: 1220668
Merge "Move declaration of int_br_device_count earlier"
Merge "LBaaS: Fix healthmonitor disassociation for non-admin"
Merge "Fix message i18n error"
Merge "Enhance unittest for hyperv_neutron_agent"