Execute the test cases in test_db_plugin.py for each plugin.
Each plugin now get its own test_<plugin_name>_plugin test module.
This commit excludes cisco and metaplugin plugins, which do not run
the "core" unit tests at all.
Clark Boylan [Tue, 21 Aug 2012 21:41:29 +0000 (14:41 -0700)]
Add nosehtmloutput as a test dependency.
Adding nosehtmloutput as a test dependency allows nose to output its
results to an html file. This will be used by Jenkins to save logs on
a different server.
This patch will enable regular users to list subnets on a shared
network by exposing the subnet's "shared" attribute to the policy
engine, and letting it applying different rules if the subnet is
shared or private.
also add check to make sure that floating IP's are only associated if
the upstream router has a external network gateway to the appropriate
external network.
The tests for bulk resource creation failure were failing since the bulk
API calls were not getting relayed correctly to the virt_phy_sw.py, that
has been fixed
There tests for the network_multi_blade_v2.py were failing since DB
initialization order was incorrect.
The tests in test_api_v2.py were failing since the plugin instance was
not being reset for each test.
This fixes the bug by ensuring that the netns deletion always runs in the root
namespace. Tests were updated to reflect the change in execute
invocation.
'status' have four values 'ACTIVE/DOWN/ERROR/BUILD' in v2 spec.
However, some plugins still using 'UP/DOWN' from v1. In order to
consistent the use of 'status' value. A common constant file was
created and modified all plugins to use the same constant value.
This fix is phase 1 of a fix that to address re-allocation of a fixed_ip before
the DHCP lease expires. The next phases will add RPC and recycling
support.
We implement it as an extension for linux bridge and ovs plugins.
We also expose the /quotas/Xx url to client to operate the quota.
We need admin role to show other tenant's quota, and to update quota data.
Any user can show its own tenant's quota. An DB table is used to save the
quota for each tenant.
To use it, we have in quantum.conf:
quota_driver = quantum.extensions._quotav2_driver.DbQuotaDriver
The default quotas for each tenant are defined in quantum.conf too.
In addition, modify extension framework to allow exposing a new resource and
its controler. The extension can check the environment, such as configuration
in global cfg.CONF to decide if it can be enabled.
Also, we can define enabled extensions for each plugin in extensions.py
New resources can be put into quota framework via quota_items in nova.conf
The run_tests.sh script's PEP8 pass (with current 1.3.3) was
reporting under- or over-indented visual continuations in a handful
of files, all of which are fixed with this trivial patch.
The provider extension is supported by the linuxbridge and openvswitch
plugins and their agents [openvswitch phase 2 implementation is
in-progress, and does not yet support flat networks or multiple
interfaces].
Ranges of VLANs available on named physical networks for normal
allocation are specified in the plugin's config file via the
ListOpt syntax:
The mapping of each named physical network to its physical network
interface is specified (per-agent-host) in the agent's config file via
the ListOpt syntax:
Nachi Ueno [Mon, 13 Aug 2012 08:13:20 +0000 (08:13 +0000)]
Add device_owner attribute to port
in order for firewall logic to be able to poke a hole allowing traffic to/from a DHCP server,
we need to expose the IP being used for DHCP in a subnet to external entities.
This commit adds device_owner attribute, then dhcp-agent will update the device_owner value
of port to dhcp-agent.
The API layer is now able to issue bulk create requests to the plugin,
assuming that the plugin supports them. Otherwise, the API layer will
emulate atomic behavior.
This patch also implements OVS plugin support for bulk requests.
Dan Wendlandt [Mon, 13 Aug 2012 12:20:11 +0000 (05:20 -0700)]
improve test_db_plugin so it can be leveraged by extension tests
prereq for bp quantum-l3-fwd-nat
- load extension middleware as well as core API
- support 'action' requests in addition to CRUD ops
- add helper methods that check API return code
- clean-up places where existing tests where hitting 409s on delete
but ignoring the errors (basically SubnetInUse errors).
This patch allows Quantum to handle public networks. It modifies the
API adding a new attribute to the network resource ('shared')
and enhances the policy engine in order to handle the behaviour of
the service wrt shared networks.
Policy.json specifies a default behaviour which can be changed by
the administrator, even at runtime.
Tests added to test_db_plugin validate 'obvious' behaviour - such as
that only the ports belonging to a given tenant should be returned
even when they are queried on a public network.
Tests added to test_policy instead validate the changes added to the
policy engine.
This plugin supports multiple plugins at same time. This plugin is for L3 connectivility
between networks which are realized by different plugins. This plugin add new attribute 'flavor:id'.
flavor:id correspond to specific plugin. flavor-plugin mapping could be configureable by plugin_list config.
This plugin also support extensions. We can map extension to plugin by using extension_map config.
Dan Wendlandt [Sun, 12 Aug 2012 02:42:59 +0000 (19:42 -0700)]
Linux Agent improvements for L3
prereq for bp quantum-l3-fw-nat
- make init_l3 take cidrs, rather than assuming an augmented port object
- make namespace for agent operations optional and allow the namespace
name to be configured.
- allow plug() operation to take an optional bridge parameter indicating
which bridge to plug into
- add namespace support for iptables manager
- make OVS plug() set the IP address, etc. of a device even if it already
exists.
This fix moves the correct device into the namespace and improves the test
to ensure the proper device was moved. The previous generic check
failed to catch an error during refactoring.