Zhongyue Luo [Tue, 21 May 2013 16:37:00 +0000 (00:37 +0800)]
Reference OVS OptGoup names in lowercase
To have consistent option group name format across projects,
oslo.config now normalizes all non lowercase group names to lowercase
when loading conf files.
Thus conf files are backwards compatible but option group references
in the code must now use lowercase before we update oslo.config.
Ryota MIBU [Mon, 20 May 2013 05:36:39 +0000 (14:36 +0900)]
Make logging level in unit tests configurable.
Added a debug option to unittest(BaseTestCase) which sets logging level of
fixtures.FakeLogger to DEBUG. To enable this option, set OS_DEBUG=True or
OS_DEBUG=1 in environment variables.
gessau [Wed, 15 May 2013 01:57:47 +0000 (21:57 -0400)]
Check network vlan ranges for correctness.
Check that the range beginning and end tags are valid values 1-4094.
Supply two global constants for min/max vlan tags and update all
local usage of these values to use the global constants.
Zhongyue Luo [Sat, 18 May 2013 13:52:15 +0000 (21:52 +0800)]
Reference DEFAULT_SERVICETYPE OptGoup names in lowercase
To have consistent option group name format across projects,
oslo.config now normalizes all non lowercase group names to lowercase
when loading conf files.
Thus conf files are backwards compatible but option group references
in the code must now use lowercase before we update oslo.config.
This patch replaces all 'DEFAULT_SERVICETYPE' references to
'default_servicetype'
Zhongyue Luo [Wed, 15 May 2013 00:36:11 +0000 (08:36 +0800)]
Reference QUOTA OptGoup names in lowercase
To have consistent option group name format across projects,
oslo.config now normalizes all non lowercase group names to lowercase
when loading conf files.
Thus conf files are backwards compatible but option group references
in the code must now use lowercase before we update oslo.config.
This patch replaces all 'QUOTA' references to 'quota'
Deprecate "extension:xxx" policies but preserve bw compatibility
Blueprint make-authz-orthogonal
Patch #4 for this blueprint.
With this change, if policies starting with 'extension' are still
present in policy.json, a deprecation warning will be emitted, and
the policy will be translated in the corresponding, new-style,
policy(ies).
fujioka yuuichi [Tue, 14 May 2013 00:01:17 +0000 (09:01 +0900)]
fix reference to tenant id.
Administrator can create resource, even if the tenant of resource is
different from the one of authentication. For example, administrator
can operate 'quantum net-create' command with different tenant
between the authentication tenant(--os-tenant-name) and --tenant-id.
In this case, quota cannot be restricted with the resource tenant,
because it is restricted with --os-tenant-name.
Bob Kukura [Tue, 14 May 2013 21:35:08 +0000 (17:35 -0400)]
Fix linuxbridge RPC message format
The linuxbridge, openvswitch, and hyperv plugins all use the same
basic RPC interface between their plugins and L2 agents. But the
attributes describing a virtual network passed from the plugin to the
agent over this interface differed for historical reasons. The
openvswitch and hyperv plugins each pass network_type,
physical_network, and segmentation_id attributes, whereas the
linuxbridge plugin previously passed vlan_id and physical_network
attributes, using special vlan_id values to indicate flat or local
network types.
This patch changes the linuxbridge plugin to pass network_type and
segmentation_id attributes instead of the vlan_id attribute, bringing
its message formats into sync with the other plugins. RPC
compatibility is required for blueprint modular-l2 so that the ml2
plugin can work with all three existing types of L2 agent. This RPC
message format change is also required for blueprint
vxlan-linuxbridge.
Unlike the vxlan-linuxbridge patch on which it is based (see
https://review.openstack.org/#/c/26516/), this patch does not bump the
linuxbridge RPC version number, as the ml2 plugin will require all
three L2 agents to use the same RPC version. Instead, the updated
linuxbridge agent maintains compatibility with old linuxbridge plugins
by accepting either the old or new attributes. There is also a
configuration option, currently turned on by default, to enable the
updated linuxbridge plugin to pass the vlan_id attribute expected by
old linuxbridge agents along with the new attributes. These message
format compatibility mechanisms are intended to aid during upgrades,
and can eventually be removed.
Paul Michali [Fri, 10 May 2013 13:17:24 +0000 (06:17 -0700)]
Add negative UT cases for subnet/GW create/update
When force_gateway_on_subnet is configured, ensure
that a GW with IP same as subnet, and BCAST GW IP
are rejected during subnet create. For subnet update,
ensure GW outside of subnet is rejected.
This patch implements part #3 of this blueprint, according to its
specification.
It does so by allowing the view generator in the API layer to strip
off fields which do not satify authorization policies.
Also, some checks in unit tests for plugins relied on the
capability of the plugin to invoke directly the policy engine.
This checks have been removed and replaced by equivalent unit tests.
Finally, this patch required changes to most test cases for API
extensions in order to ensure the resource attribute map was
updated with the extension's attributes
Aaron Rosen [Tue, 14 May 2013 04:02:00 +0000 (21:02 -0700)]
Add missing unit test for NVP metadata_mode option
Note: I didn't squash this change in my patch that made the default
transport type configurable because this change was not in grizzly
and we do not want to backport it.
Aaron Rosen [Mon, 13 May 2013 00:25:04 +0000 (17:25 -0700)]
Allow ports to be created on networks that do not exist in NVP
If a network exists in the quantum database but not in NVP we should allow
someone to create a port on this network and set the status to ERROR. The
reason for this is if one deletes a network from NVP and when the dhcp agent
goes to create it's dhcp port on this network an error will be raised to the
agent and it will enter a constant state of resyncing.
This patch also adds a unit test for update_port() for the same situation.
Irena Berezovsky [Mon, 11 Mar 2013 10:10:15 +0000 (12:10 +0200)]
blueprint mellanox-quantum-plugin
Implements Mellanox Quantum plugin.
This plugin implements Quantum v2 APIs with support for Mellanox embedded
switch functionality as part of the VPI (Ethernet/InfiniBand) HCA.
Add ability for core plugin to implement advanced services
implements blueprint api-core-for-services
Add check for supported_extension_aliases in QuantumManager.
If core plugin supports certain service extension, then core plugin is
stored in service_plugins for the service type of this extension
so corresponding extension could set it as a controller for REST calls.
Do not require sudo/rootwrap to check for dnsmasq version
The dnsmasq version check does not need root privileges
to run as with low privs it works just fine. As a side
effect, the use of the rootwrapper was causing unit tests
to hung because the execute call in check_version was not
being stubbed out. Weirdly enough this wasn't caught in
a previous Gerrit run; there must be a passwordless sudo
lurking around somewhere in the Gerrit infrastructure.
Henry Gessau [Thu, 9 May 2013 04:28:39 +0000 (00:28 -0400)]
Create a common function for method _parse_network_vlan_ranges used
by plugins.
The _parse_network_vlan_ranges method does the same thing for the
linuxbridge, ovs, and hyperv plugins. Create a common function for
the plugins to use instead. This paves the way for improving vlan
range verification (see #1169266) in one place.
For the most part, the dhcp agent uses the root_helper setting from the [AGENT]
section of /etc/quantum/quantum.conf. However, in a couple of spots, the
root_helper setting from the [DEFAULT] section of /etc/quantum/dhcp_agent.ini
was being used.
Roman Podolyaka [Wed, 8 May 2013 15:34:51 +0000 (18:34 +0300)]
Fix usage of SQLAlchemy Query.first() method
Query.first() doesn't raise the NoResultFound exception
if no result is found but rather returns None, so wrapping
of Query.first() call into a try/except NoResultFound block
is useless.
Roman Podolyaka [Tue, 7 May 2013 18:57:53 +0000 (21:57 +0300)]
Fix usage of NexusPortBindingNotFound exception
Currently the required keyword argument (port_id)
is not passed when the exception is raised. In fact
this exception has never been raised before due to
another bug (1173131) so this change also has to
ensure it doesn't break any existing code using
functions which can possibly raise this exception.