This removes check_ports_on_host_and_subnet which mostly duplicates what
check_ports_exist_on_l3agent is doing.
Also rename check_ports_exist_on_l3agent to check_dvr_serviceable_ports_on_host
for more clarity.
Closes-Bug: #1524291
Change-Id: Ie02c68279c2bbafffc7be4d9a81fe25a0e983d58
Currently 'flows' is being checked for empty list in
a non standard way 'if flows == []:'. This patch
simplifies logic so that above check is unnecessary.
TrivialFix
Change-Id: I0eac42e425213b6588090e7e2379b14446308361
This patch simplifies the process for validating the request body for
POST and PUT requests and preparing it for dispatching to plugins.
In particular it removes the need for parsing the URL to find the
resource identifier, and instead leverages Pecan's routing engine
to extract it. As a result the attribute population hook now simply
deals with request body validation, and has been renamed accordingly.
The logic for loading the current state of the object from the plugin
in order to enforce authZ policy on PUT requests has been moved to
the appropriate hook, PolicyEnforcementHook.
The logic for managing plural/singular names for resource has also been
improved, and two helper functions to retrieve a resource's attributes
have been added to neutron.api.v2.attributes
The logic for aborting requests with unsupported HTTP methods has also
been moved to the REST controllers. It used to be in PolicyEnforcementHook,
which was probably not the right thing to do.
This patch also unskips a functional test concerning ownership checks,
and add functional tests for verifying correct request processing.
Unit tests for the newly added helper functions are also provided.
Related blueprint wsgi-pecan-switch
Change-Id: Ib26998b37bdeec8af7a97f77b66d421b8cd271da
The get_unused_ip function returns an address that isn't in use on
the network at the time it's called. However, by the time the caller
uses it, it may have been allocated to another concurrent test if
the network is shared or external.
The test_create_floatingip_with_specified_ip_address test creates
a floating IP with an unused IP on the external network, which has
lots of activity on it from other tests so it would occasionally
have its address taken by another test.
This patch just catches the in use error and tries again with a
new IP.
Change-Id: I5a2f78a6da1e400dea07949f35964abb767edbb2
Closes-Bug: #1532033
Fix filters to get the right gateway port for a subnet.
Wrong filters led to random port's mac being returned which may cause
side effects. See bug for details.
Closes-Bug: #1530179
Change-Id: I8368255f00ab3e9586c8ff28dfe6739541000810
This patch ensures that models_v2 and the router db module
import the agent binding modules so their models are defined
in the sqlalchemy metadata. Otherwise, using an agentless
core/L3 plugin may result in a failure to initialize if nothing
imported the agent module.
Change-Id: I77240462b618d6e95c7c5862441d6d179e371f4f
Closes-Bug: #1529022
Commit 5d53dfb8d64186b5b1d2f356fbff8f222e15d1b2 removed the
method _get_tenant_id_for_create. This is used by various plugins
and the *aaS libaries.
Change-Id: I6d5e2555d6c198102a3d5400609f1d671e0d388d
Since the API tests have been moved to the neutron_lbaas
tree, left over cruft may now be removed.
Change-Id: I7e3c3bd51c3621f6b1cc695838c618aee2130066
In the guideline of cliff command, developers implementing
commands should override take_action() rather than run().
The similar effort is being done in neutronclient side and
this fix is required to complete the effort.
Logger definition in each command class is no longer needed.
This commit also drops them.
Closes-Bug: #1532258
Change-Id: I613b7e18b3c058568fc3669ad1524e60a93eb9f8
_get_vm_port_hostid returns the host id associated with the
dvr service ports. It not only returns the VM port hostid, but
also returns the host id associated with LBaaS vip port and
dhcp.
So to be in sync with other function names let us rename the
function to _get_dvr_service_port_hostid.
Change-Id: Idc69d3b35a371b987aa34597ed6e1de7b96ff2e5
This dvr_vmarp_table_update is not only used to update
the arp entry for the VM ports, but also for other
DVR service ports.
So the function name is kind of misleading and hence
changing it to an appropriate name that fits its function.
Change-Id: I6d5b0b717dcff964a514c83b0cd60b044411f0db