This changeset adds a new parameter, 'allocation_pools' to the 'subnet'
resource of the Quantum v2 API.
Allows for creating and validation of subnets with multiple allocation pools.
This commit only deals with POST verb (subnet creation).
PUT verb (subnet update) will be dealt with in a subsequent commit.
Gary Kotton [Thu, 28 Jun 2012 10:26:10 +0000 (06:26 -0400)]
v2 support for the linux bridge plugin
blueprint lb-api-v2-support
Plugin support for the linuxbridge using the v2 API
1. The core_plugin in quantum.conf must be set to:
quantum.plugins.linuxbridge.LinuxBridgePluginV2.LinuxBridgePluginV2
2. By default the agent is v2. A configuration file entry 'target_v2_api'
in the section 'AGENT' can be set as False to support v1.
Gary Kotton [Sun, 1 Jul 2012 07:06:07 +0000 (03:06 -0400)]
Check if interface exists in bridge prior to adding.
This fixes bug 1019730. The fix for bug 1000406 ensures that return
values of shell commands are checked. The command
utils.execute(['brctl', 'addif', bridge_name, interface],
root_helper=self.root_helper)
would cause an exception if there was more than one attachment
on the network. The reason for this was the interface already existed
on the bridge.
Monty Taylor [Thu, 28 Jun 2012 14:45:35 +0000 (07:45 -0700)]
Use setuptools git plugin for file inclusion.
Fixes bug 1018833. We're looking at this as a possible pan-project
option instead of manual MANIFEST.in inclusion and then looking for
where the tarballs differ.
The allocation is done as follows (according to the value of
port['fixed_ips']):
- api_router.ATTR_NOT_SPECIFIED - Quantum will generate an IP address.
If a v4 subnet is defined then a v4 address will be generated. If
a v6 subnet is defined then a v6 address will be generated. If both are
defined then both v4 and v6 addresses will be generated.
- user configuration which may contain a list of the following:
- ip_address - the specific IP address will be generated
- subnet_id - an IP address from the subnet will be generated
Juliano Martinez [Mon, 18 Jun 2012 22:30:36 +0000 (19:30 -0300)]
Bug #1012418 - quantum agent for OVS does not install properly on Xen XCP
This change added the feature to package and install the ovs-quantum-agent inside XS and XCP,
added an option on Makefile to gen and install using python2.6 ( by default it will use 2.4 )
Jenkins [Thu, 21 Jun 2012 13:27:52 +0000 (13:27 +0000)]
Merge "Added iptables_manager ( based on openstack/linux_net.py ) This module will be the base library to implement security groups and generic firewall. It is an independent iptables module, made to be easy to package if used by agents and also inside quantum"
Juliano Martinez [Mon, 18 Jun 2012 14:00:45 +0000 (11:00 -0300)]
Added iptables_manager ( based on openstack/linux_net.py )
This module will be the base library to implement security
groups and generic firewall.
It is an independent iptables module, made to be easy to package
if used by agents and also inside quantum
Using quantum.agent.linux.utils
Added support to root_helper
Gary Kotton [Sun, 3 Jun 2012 11:55:09 +0000 (07:55 -0400)]
Implements the blueprint use-common-cfg for the quantum service.
More specifically uses global CONF for the quantum.conf file.
Added support for the RYU plugin (similar to ovs and lb,
which use non-global conf for plugins)
patch 27: clean up find_config_file
patch 28: for config file use old paths (plugin unit tests)
this hopefully will be replaced when we move to common
config file
patch 30: rebase and merge (utils.py and policy.py)
Gary Kotton [Tue, 19 Jun 2012 23:32:22 +0000 (16:32 -0700)]
Ensure unique mac address allocation.
This is the first part of bug 1008029
If the port command does not contain a MAC address then Quantum will generate
a random MAC address. The mac address will be saved in the database to ensure
that it is not used by another port on the same network.
Adds the policy openstack-common module and implements policy checks
for the v2 API. Note that this cut only addresses whole objects (i.e.,
a subnet or a network or a port), not specific fields within objects.
(This means that attributes are not filtered out based on policies.)
Implements blueprint authorization-support-for-quantum.
Removed all unused functions and imports from common/utils.py.
Patch set 2: Submitted same code by mistake
Patch set 3: removed commented code but inappropriate commit msg.
Patch set 4: removed commented code with appropriate commit msg. Removed pep8 changes for ucs plugin.
Roman Sokolkov [Fri, 15 Jun 2012 13:13:33 +0000 (17:13 +0400)]
Added vlan range management for OVS plugin
* Added integer config flags: vlan_min, vlan_max
* If vlan_min is larger than vlan_max log warn and use default values
* Changed test_vlan_map.py in favor removed definitions of VlanMap class
Removed use of argument action_prefix for Client. Also, made HOST, PORT and USE_SSL global. Signed-off-by: Harsh Prasad <prasad.tanay@gmail.com>
Change-Id: I93037b34fca89786778a2dcd8a3afc80df5687f8
- rename few attributes:
op_state -> status
additional_routes -> additional_host_routes
prefix -> cidr
- expand request body validation to indicate whether fields can be
specified during create and or update.
- add test cases to validate defaults, and input validation.
- update db_base_plugin_v2 to generate gateway_ip for subnet and mac
for port when unspecified.
- validate that tenant-id is only specified in req by admin users
- automatically set tenant-id based on request.context.tenant_id if needed
Clark Boylan [Fri, 8 Jun 2012 21:26:58 +0000 (14:26 -0700)]
Add build_sphinx options.
To better facilitate the building and publishing of sphinx
documentation by Jenkins we are moving all openstack projects with
sphinx documentation to a common doc tree structure. Documentation
goes in project/doc and build results go in project/doc/build.
Zhongyue Luo [Thu, 7 Jun 2012 02:20:25 +0000 (10:20 +0800)]
Quantum should use openstack.common.jsonutils
Implements blueprint use-common-jsonutils
1. Edit openstack-common.conf and import quantum/openstack/common/jsonutils.py
2. Remove json package imports and replace with jsonutils
3. Remove json related functions in common/utils.py
Dan Wendlandt [Wed, 6 Jun 2012 19:41:13 +0000 (12:41 -0700)]
Remove hardcoded version for pep8 from tools/test-requires
In email discussions we decided that the master branch should always
pull in the lastest version of the pep8 tool, which keeps us closest
to the real pep-8 document. Therefore, I'm removing the hardcoded
version here to match the lack of a pep8 version in tox.ini (which is
what the CI infrastructure uses when running the gating pep8 checks).
Note that your pep8 version will only update when you re-run
pip install --upgrade -r tools/test-requires .
Adds authentication support for Quantum. Generates a context object
and stuffs it into the 'quantum.context' variable in the WSGI environment.
This will be used in conjunction with authZ, later.
Dan Wendlandt [Tue, 5 Jun 2012 05:07:27 +0000 (22:07 -0700)]
Add common dir for shared agent code, add OVS lib.
bp quantum-agent-common
Adds a common directory that can be used for code shared by agents for
different plugins. Also seeds this directory with an OVS library,
removing that code from the openvswitch plugin itself. This code
can then be leveraged by other plugins (e.g., Ryu) who have similar code.
Also add a suite of mox-based tests for OVS lib.
Also add more powerful OVS flow expression builder as suggested by
salv-orlando, plus additional flow expression testing.
Note: the expectation is that this directory will be used for much of the
agent functionality that is similar to what Nova's nova/network/linux_net.py
file included, such as iptables manipulation, dhcp manipulation, etc.
People should be careful about changing code in this directory in a
non-backward compatible way, as other plugins may be using the code as well.
XS should not have the centos repo enabled by quantum this can break the system, also is possible to get the sqlalchemy from epel and avoid unneeded packages on the system.
It's running without any issue with 1.2, the exception problem was caused
by WebTest. We should use at least version 1.3.3 (supplied by Ubuntu 12.04 and Debian Wheezy)
According to plugin api of QuantumPluginBase, unplug_interface
should only raise exception.NetworkNotFound and exception.PortNotFound.
To unplug a non-attached port should not raise Exception.
After this modification, to unplug an non-attached port will have no impact.
In addition, I remove the 'network = db.network_get(net_id)' since
'db.validate_port_ownership(tenant_id, net_id, port_id)' statement has taken
care of the check.
patch 2: split test case to test it exclusively compared to patch 1.
patch 3: remove added test statement in previous test case
Gary Kotton [Tue, 29 May 2012 12:19:45 +0000 (08:19 -0400)]
Parse linuxbridge plugins using openstack.common.cfg
Implements the blueprint use-common-cfg
In order for the linuxbridge plugin to use the rpc code soon to be merged into
openstack-common, we need to parse our configuration using cfg. Here we
make the most simple, backwards compatible change in that direction.
The same is relevant for the openvswitch implementation
When running ovs_quantum_agent in tunneling mode and a new tunnel_ip is added while
an agent is running the following exception below occurs. This causes the agent to
no longer function since it becomes caught in a loop.
ERROR:__main__:Main-loop Exception:
Traceback (most recent call last):
File "ovs_quantum_agent.py", line 583, in daemon_loop
self.manage_tunnels(tunnel_ips, old_tunnel_ips, db)
File "ovs_quantum_agent.py", line 550, in manage_tunnels
self.add_tun_br_flows_for_local_vlan(lv_obj)
AttributeError: 'OVSQuantumTunnelAgent' object has no attribute 'add_tun_br_flows_for_local_vlan'
Yong Sheng Gong [Fri, 25 May 2012 12:10:07 +0000 (20:10 +0800)]
fix some pylint warnings.
1. Parent class should have instance variables used in its method(s).
2. remove some unused imports
Patch 2: fix according to comments
Patch 4: fix problem under pep8 1.1
Change-Id: Iafd89a6017b30484fb8da50219be6b4ae073f083
mat [Wed, 16 May 2012 14:16:43 +0000 (16:16 +0200)]
Cisco plugin CLI call to quantumclient CLI
when Cisco plugin CLI is used, it wil call the quantumclient CLI if the command is not in its extensions.
the version of the Quantum API must be specified when the the Cisco plugin CLI is looking for Quantum commands.
mat [Tue, 15 May 2012 15:35:12 +0000 (17:35 +0200)]
Calling Super method from QuantumPortAwareScheduler.__init__
the quantum.plugins.cisco.nova.quantum_port_aware_scheduler.QuantumPortAwareScheduler class wasn't calling its superclass __init__.
the host_manager attribute of driver.Scheduler class wasn't initialized, and the scheduler was crashing when it was receiving a host message via amqp.
Dan Wendlandt [Tue, 15 May 2012 19:41:52 +0000 (12:41 -0700)]
OVS plugin: add tunnel ips to central database
bp simplify-ovs-tunnel-mgmt
Makes the OVS plugin agent report its own IP address to the centralized
quantum database, and build its set of tunnels based on the contents of
this centralized database. This removes the need for a removes need for
a 'remote-ips' file on each compute node that needs to be updated
when a new host is added.
Also:
- simplifies error handling within tunnel manager daemon_loop
- fixes issues with operational status not working for tunnel-mode
- fixes issue that not-stripping vlan of tunneled packet potentially
crashes OVS, causing flows to get wiped.
Bhuvan Arumugam [Mon, 7 May 2012 03:27:26 +0000 (20:27 -0700)]
Include AUTHORS in release package.
Fixes Bug #976267.
Include AUTHORS file in release package. The file is generated
automatically from git. Handle different combination for mailmap
records. Include test case to verify this fix.
* MANIFEST.in
Include AUTHORS file in release package.
* .gitignore
Add AUTHORS file.
* quantum/openstack/common/setup.py
generate_authors(): New method to create AUTHORS file. If
AUTHORS.in file exists, append it's content to AUTHORS file.
parse_mailmap(): Handle all mailmap combination while parsing.
* setup.py
Import the new method.
Generate AUTHORS file before creating the package.
* quantum/tests/unit/test_setup.py
New test script to verify different combination of records
in mailmap file.