Don't reconnect to exclusive fanout consumers.

See bug #1180166, basically we shouldn't be trying to reconnect to
exclusive queues.

Fixes: bug #1180166
Change-Id: I71ac5a150ea8c4d97a34404cb821ce8e8dfa152d
Add IpFilter, IPNetnsExecFilter and EnvFilter

These filters have been implemented in Quantum before:

- IpFilter provides support for filtering ip commands
- IpNetnsExecFilter is a chaining command filter that
  verifies that the command to be executed by ip netns exec
  is covered by other established filters.

IpNetnsExecFilter has been restricted to ensure that the
filter chains have all matching filters run as the same
user.

EnvFilter is a new filter derived from CommandFilter
that allows a Command to be optionally prefixed by "env"
and a specific list of environment variables.

This is intended to replace the specific DnsmasqFilter
and DnsmasqNetnsFilter in the future when all consumers
have been updated.

Implements bp rootwrap-quantum-features

Change-Id: I0cf39967126e99a8dc53d21bee824a0fe2f63aa0
Add network_utils.urlsplit

This unfortunately needed if we want to parse URL with params and
unknown schemes.

Change-Id: Ia7d8212370201254e537e6f1dd9b15d669a3252f
rpc: remove some unused serialization code

The first commit of Nova contains this code as

 https://github.com/openstack/nova/blob/bf6e6e7/nova/rpc.py#L149

    try:
        publisher.send({'result': reply})
    except TypeError:
        publisher.send(
                {'result': dict((k, repr(v))
                                for k, v in reply.__dict__.iteritems())
                 })

but when the kombu driver was first added, it became:

 https://github.com/openstack/nova/blob/9cb46c48/nova/rpc/impl_kombu.py#L717

        try:
            msg = {'result': reply, 'failure': failure}
        except TypeError:
            msg = {'result': dict((k, repr(v))
                            for k, v in reply.__dict__.iteritems()),
                    'failure': failure}
        conn.direct_send(msg_id, msg)

Obviously, TypeError can't be raised with the current code and we dump
everything to json these days before passing down to kombu, qpid, etc.

Change-Id: I932fbfbbe824fbd9de8d31f070878e9db853ee45
Don't use mixture of cfg.Opt() deprecated args

No need to make this any more ugly than it needs to be :)

Change-Id: Ib7ef13bb5f04e1780565de805eb81413d7b21274
Fixes crash when no help for an option

When there is no help available for an option, the generator.py
simply crashes. This fixes this by initialising opt_help.

Fixes Bug1194524

Change-Id: I94c23973bdad603703f12e936b7e72fe0e81c3f0
Merge "Fixes crash when no help for an option"
Make AMQP based RPC consumer threads more robust

bug 1189711 Should RPC consume_in_thread() be more fault tolerant?

There are unprotected holes in the thread kicked off by RPC
consume_in_thread such that an exception will kill the thread.
This exists for both the service (TopicConsumer) and the new
reply proxy (DirectConsumer) consumers. This patch plugs
those holes as close to the base of the consumer thread as
possible by catching all non-caught exceptions and retrying
with sleeps between retries and some pacing of the log
output to prevent log flooding.

Change-Id: I0d6ec8a5e3a310314da201656ee862bb40b41616
Merge "rpc: remove some unused serialization code"
Merge "Add IpFilter, IPNetnsExecFilter and EnvFilter"
Merge "Make AMQP based RPC consumer threads more robust"
Merge "Don't reconnect to exclusive fanout consumers."
Merge "Add network_utils.urlsplit"
Merge "Don't use mixture of cfg.Opt() deprecated args"