fix bug lp:1019230,update rpc from openstack-common.

Change-Id: I498e578affef4fa9df6c50cd7284ebd7e3f9a64e
Ryu plugin support for v2 Quantum API

blueprint update-ryu-plugin-for-v2

Ryu plugin using the v2 Quantum API.

Change-Id: I9d42b3aee4b51edbc0b80d8f8372f65eb47df9af
Merge "fix bug lp:1019230,update rpc from openstack-common."
Introduce files from openstack common.

Because the openstack common project does not stick to latest pep8 rules,
I have to exclude some bad-ruled files in the tox.ini and run_tests.sh.
However pep8 does not support exclude option in the format quantum/openstack/common,
so I have to exclude some of openstack common files one by one.

Also, I have changed the Qunatum Context to base on the common context.

I does not update the setup.py in our openstack common dir and the one
under quantum top dir, since it should be maintained in a consistent way
across all of openstack projects.

After this introduction, we are ready for notification feature.

Change-Id: I2729c2dc3958835374c88d704e842e613785ec14
Raise proper exception if policy file do not exist

Fixes bug 1022966.

Change-Id: Ia1f9a95eb9e956d0d65efb50e674de18d0552b6e
Avoid removal of attributes used by policy engine

Fixes bug1025150

Ensures that each attribute which is used by the policy engine is not
removed by the plugin when the 'fields' query parameter is specified.
This could be better achieved by not having the plugin perform this
selection, but as it is part of the plugin interface, it's probably better
not to introduce changes which alter it.

Change-Id: I68ab0998b7113f06da5df74ccd44e390640de475
Merge "Introduce files from openstack common."
Merge "Ryu plugin support for v2 Quantum API"
Add validity checks to Quantum v2 resources

Fixes bug 1015148

The code enable defining validity checks for input variables. This
is done via callback functions per type. The following types are supported:
    - type:values - checks that data is valid according to a list of values
    - type:mac_address - checks that data is a valid mac address
    - type:ip_address - checks that data is a valid ip address
    - type:subnet - checks that data is a valid cidr
    - type:regex - checks that data matches a regular expression (for
      example checking UUID validity)

Change-Id: Iaa694cbfe3c518a5cd3951271853fe986106e7f5
Provide way to specify id in models_v2

Bug #1025127

Change-Id: Ie4112b841c1e42408cdb539c2b87446c596e92ba
Ensures policy file is reloaded only if updated.

Fixes bug 1023649

The fix is 'inspired' (ie: copied) from nova. It is cached in memory unless a
change in policy file is detected. In that case, a reload is triggered.

This patch also adds a set of unit tests for quantum/policy.py, which was
previously not covered.

Change-Id: I337042ae418b518268acd30c26ef02559887a8be
fix bug lp:1025526,update iniparser.py to accept  empty value.

also,this patch turn off pep8 E125 check,this for now seems to
be unnecessary,it check continuous line split.and update the
latest openstack-common https://review.openstack.org/#/c/9201
which has fix pep8 1.3 issue except for E125 check.

Change-Id: I86e6a3add56a0a2941031a1248f1696667ac56b8
Assume that subclass validates value of UUID

Change-Id: I8501d10a798cc90c027bb981c5a3ca5a0ef6e622
Merge "Assume that subclass validates value of UUID"
Add quota features into quantum.
Blueprint quantum-api-quotas

We support quota check for creating network, subnet and port.
Change-Id: I943335816308767c7eba084d80b969fcb2e5a8fb
Refactor the test cases so that all the test cases are under one test class.

Change-Id: I31c5c51a3f7fa4b7cb068b7b93692411956e62ac
Merge "Add quota features into quantum. Blueprint quantum-api-quotas"
Enhance V2 validations to work better for integers and booleans

Fixes bug 1026598

The attributes are now able to cast a input value to a specific type.
At the moment boolean and int are supported.

Change-Id: I568a95bc60f91c3eeae03b305031502d50de9c44
Add v2 API support for the Cisco plugin
Blueprint cisco-plugin-v2-api-support

New meta-plugin which makes use of the Quantum db_plugin and supports
the new v2 API
Changes to the Cisco DB model, now reusing quantum DB for core attributes
Changes to the device sub plugins to access the quantum DB for core
resources' state versus Cisco DB
Addition of fake/dummy drivers to support testing of the device sub
plugins even without actual hardware
New v2 unit tests which exercise the meta-plugin and the device sub
-plugins as well
In general creating new v2 modules such that v1.x code can be deprecated
easily by deleting the older modules. The following files are v2
versions of older modules, only the imports have changed, most of the
other code is the same as from the older modules (already reviewed):
quantum/plugins/cisco/common/cisco_credentials_v2.py
quantum/plugins/cisco/db/network_db_v2.py
quantum/plugins/cisco/db/network_models_v2.py
quantum/plugins/cisco/db/nexus_db_v2.py
quantum/plugins/cisco/db/nexus_models_v2.py
quantum/plugins/cisco/db/ucs_db_v2.py
quantum/plugins/cisco/db/ucs_models_v2.py
quantum/plugins/cisco/nexus/cisco_nexus_plugin_v2.py
quantum/plugins/cisco/ucs/cisco_ucs_inventory_v2.py
quantum/plugins/cisco/ucs/cisco_ucs_plugin_v2.py
quantum/plugins/cisco/segmentation/l2network_vlan_mgr_v2.py

All changes are contained with the Cisco plugin.

(Sumit & Rohit)

Change-Id: Ib82a9f843548c286c84ba63caf5406a773ac85b1
Implements data-driven views and extended attributes.

The quantum/api/v2/views.py module is replaced by is_visible
properties in the RESOURCE_ATTRIBUTE_MAP defined in
quantum/api/v2/attributes.py. Extensions are given the ability to add
extended attribute descriptions to this map during initialization,
allowing extended attributes to be implemented similarly to core
attributes in plugins.

Resolves bug 1023111.

Change-Id: Ic6e224d5d841b6a1d4d1c762d7306adaf91f7a2d