Merge "Remove 'dvr_extra_resources' option"

This commit is contained in:
Jenkins 2017-04-06 22:31:24 +00:00 committed by Gerrit Code Review
commit 82d6f71d6a
3 changed files with 8 additions and 52 deletions

@ -0,0 +1,8 @@
---
upgrade:
- |
The deprecated config option 'dvr_extra_resources' from network group has been removed.
This option was for extra resources which were provisioned to bind a router to Neutron
L3 agent. The extra resources need to be provisioned in Liberty release or older,
and are not required since Mitaka release. Current Tempest doesn't support Liberty, so
this option has been removed from Tempest.

@ -28,7 +28,6 @@ AGENT_MODES = (
class L3AgentSchedulerTestJSON(base.BaseAdminNetworkTest):
_agent_mode = 'legacy'
is_dvr_router = False
"""
Tests the following operations in the Neutron API using the REST client for
@ -68,46 +67,6 @@ class L3AgentSchedulerTestJSON(base.BaseAdminNetworkTest):
raise exceptions.InvalidConfiguration(msg)
cls.router = cls.create_router()
# TODO(ylobankov): Delete this 'if' block once 'dvr_extra_resources'
# option is deleted. Currently this option is deprecated for removal.
if CONF.network.dvr_extra_resources:
# NOTE(armax): If DVR is an available extension, and the created
# router is indeed a distributed one, more resources need to be
# provisioned in order to bind the router to the L3 agent in the
# Liberty release or older, and are not required since the Mitaka
# release.
if test.is_extension_enabled('dvr', 'network'):
cls.is_dvr_router = cls.admin_routers_client.show_router(
cls.router['id'])['router'].get('distributed', False)
if cls.is_dvr_router:
cls.network = cls.create_network()
cls.create_subnet(cls.network)
cls.port = cls.create_port(cls.network)
cls.routers_client.add_router_interface(
cls.router['id'], port_id=cls.port['id'])
# NOTE: Sometimes we have seen this test fail with dvr in,
# multinode tests, since the dhcp port is not created
# before the test gets executed and so the router is not
# scheduled on the given agent. By adding the external
# gateway info to the router, the router should be properly
# scheduled in the dvr_snat node. This is a temporary work
# around to prevent a race condition.
external_gateway_info = {
'network_id': CONF.network.public_network_id,
'enable_snat': True}
cls.admin_routers_client.update_router(
cls.router['id'],
external_gateway_info=external_gateway_info)
# TODO(ylobankov): Delete this cleanup block once 'dvr_extra_resources'
# option is deleted. Currently this option is deprecated for removal.
@classmethod
def resource_cleanup(cls):
if cls.is_dvr_router:
cls.routers_client.remove_router_interface(cls.router['id'],
port_id=cls.port['id'])
super(L3AgentSchedulerTestJSON, cls).resource_cleanup()
@decorators.idempotent_id('b7ce6e89-e837-4ded-9b78-9ed3c9c6a45a')
def test_list_routers_on_l3_agent(self):
self.admin_agents_client.list_routers_on_l3_agent(self.agent['id'])

@ -613,17 +613,6 @@ NetworkGroup = [
default=False,
help="The environment does not support network separation "
"between tenants."),
cfg.BoolOpt('dvr_extra_resources',
default=False,
help="Whether or not to create internal network, subnet, "
"port and add network interface to distributed router "
"in L3 agent scheduler test. Extra resources need to be "
"provisioned in order to bind router to L3 agent in the "
"Liberty release or older, and are not required since "
"the Mitaka release.",
deprecated_for_removal=True,
deprecated_reason='This config switch was added for Liberty '
'which is not supported anymore.')
]
network_feature_group = cfg.OptGroup(name='network-feature-enabled',