# under the License.
import abc
-import itertools
import random
from oslo_config import cfg
chosen_agents):
port_bindings = plugin.get_ha_router_port_bindings(context,
[router_id])
- for port_binding, agent in itertools.izip(port_bindings,
- chosen_agents):
+ for port_binding, agent in zip(port_bindings, chosen_agents):
port_binding.l3_agent_id = agent.id
self.bind_router(context, router_id, agent)
# License for the specific language governing permissions and limitations
# under the License.
-import itertools
-
import mock
from oslo_log import log as logging
import testtools
"""Override the routine for allowing the router:external attribute."""
# attributes containing a colon should be passed with
# a double underscore
- new_args = dict(itertools.izip(map(lambda x: x.replace('__', ':'),
- kwargs),
- kwargs.values()))
+ new_args = dict(zip(map(lambda x: x.replace('__', ':'), kwargs),
+ kwargs.values()))
arg_list = new_args.pop('arg_list', ()) + (external_net.EXTERNAL,)
return super(ExtNetDBTestCase, self)._create_network(
fmt, name, admin_state_up, arg_list=arg_list, **new_args)