This is the 3rd and final patch for this bug. This patch alters ip allocation
recycling to honor lease expiration. Allocations that are in the
expiration wait state have null port_ids.
The bug noticed that an admin user could delete a port that stored
the underlying IP allocation for a floating IP. This patch prevents
the direction deletion of ports via the API for ports that are used as
router interfaces, router gateways, of for floating IPs.
Add a unit test to check such an invalid delete, and also updates
unit tests to avoid them tripping over the new checks.
siyingchun [Wed, 29 Aug 2012 01:22:26 +0000 (09:22 +0800)]
Modified code PEP8 warning.
*Find more than one space after keywords, then eat one.
*Make sure every continuation line is aligned with the first character after
the top parenthesis in the top line.
Bob Kukura [Wed, 15 Aug 2012 06:43:17 +0000 (02:43 -0400)]
Implementation of 2nd phase of provider extension for openswitch
Enhances openvswitch plugin to support flat networks and VLANs on
multiple physical networks via the provider extension. Implements
blueprint provider-networks.
See http://wiki.openstack.org/ConfigureOpenvswitch for
configuration and usage details.
A devstack patch to support the updated openvswitch configuration
variables is at https://review.openstack.org/#/c/11418/.
Summary: Copy/paste the essential parts of the rootwrap
mechanism from nova/cinder into quantum. This includes
the core changes to filter.py and wrapper.py which deal
with loading filters from files pointed to by
rootwrap.conf
Detailed changes:
Transliterate the old rootwrap/*-agent.py files to
new format, and put the results in etc/quantum/rootwrap.d
Delete the *-agent.py files.
Add conf to point to etc/quantum/rootwrap.d
Add a unit test cribbed from nova to exercise the filter
mechanism
Add a unit test to exercise the actual filtered execution
Note that as written, this patch does not set the default
execute mechanism (in the agent .ini files) to rootwrap,
leaves it as sudo. That can be done in a followon
change, or in distro specific packaging.
Note also that there is still work to do around finishing
and testing the filter specs themselves. We've decided
that that is out of scope for this patch.
Port has no 'host_routes' attribute according to the latest V2 API
specification. So, policy check for 'host_routes' is not need any
more, just remove it in this patch.
Currently, the cisco nexus sub-plugin doesn’t handle the network admin state parameter
when it’s updated. The fix would enable the sub-plugin to handle an update of the admin
state of the network. In update_network of the nexus sub-plugin, vlan corresponding to that network
is added/removed from the nexus interfaces based on the network state. Unit tests are added as well.
This patch fixes a bug in delete_network and delete_subnet where the InUse
exception was being thrown for resources owned by the network and not
the tenant. This patch force deletes network resources if they are the
only blocker to deleting the parent resource.
In the event that an IP address and gateway are defined on an interface that is
used in a flat network, then the interface details will be copied to the
bridge when it is created.
If the network is deleted then the IP addresses are returned to the interface.
On account of the new requirement to run plugin-specific tests also
along with the Quantum tests, changes are being made to
incorporate the Cisco plugin unit tests into the Quantum unit test
suite. Earlier unit tests have been moved and modified.
the fact that these plugins ever cleared this field is probably just a
misunderstanding of how the field is supposed to be used, as I don't think
it ever makes sense for the L2 plugin logic to change this field.
This is phase 2 of the bug fix. This changeset adds support for dnsmasq
--dhcp-script to notify Quantum of lease renewals. Communication between
dnsmasq and the Quantum DHCP agent occurs via UNIX domain socket since dnsmasq
may run in a network namespace. The DHCP agent is responsible for
relaying the updated lease expiration back the Quantum server.
Remove parsing of "verbose" query param from API layer
Remove "verbose" fetching from db in db_base_plugin
Remove "verbose" parameter from plugin methods
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