Merge "Python 3: do not index dict_values objects"

changes/82/204282/6
Jenkins 7 years ago committed by Gerrit Code Review
commit 6b0ab7fd63
  1. 2
      neutron/db/l3_db.py
  2. 2
      neutron/db/l3_hamode_db.py
  3. 4
      neutron/db/metering/metering_db.py
  4. 2
      neutron/db/quota_db.py
  5. 4
      tox.ini

@ -1266,7 +1266,7 @@ class L3_NAT_dbonly_mixin(l3.RouterPluginBase):
routers_dict = dict((router['id'], router) for router in routers)
self._process_floating_ips(context, routers_dict, floating_ips)
self._process_interfaces(routers_dict, interfaces)
return routers_dict.values()
return list(routers_dict.values())
class L3RpcNotifierMixin(object):

@ -470,7 +470,7 @@ class L3_HA_NAT_db_mixin(l3_dvr_db.L3_NAT_with_dvr_db_mixin):
if interface:
self._populate_subnets_for_ports(context, [interface])
return routers_dict.values()
return list(routers_dict.values())
def get_ha_sync_data_for_host(self, context, host=None, router_ids=None,
active=None):

@ -234,7 +234,7 @@ class MeteringDbMixin(metering.MeteringPluginBase,
routers_dict[router['id']] = router_dict
return routers_dict.values()
return list(routers_dict.values())
def get_sync_data_for_rule(self, context, rule):
label = context.session.query(MeteringLabel).get(
@ -253,7 +253,7 @@ class MeteringDbMixin(metering.MeteringPluginBase,
router_dict[constants.METERING_LABEL_KEY].append(data)
routers_dict[router['id']] = router_dict
return routers_dict.values()
return list(routers_dict.values())
def get_sync_data_metering(self, context, label_id=None, router_ids=None):
labels = context.session.query(MeteringLabel)

@ -83,7 +83,7 @@ class DbQuotaDriver(object):
tenant_quota[quota['resource']] = quota['limit']
return all_tenant_quotas.values()
return list(all_tenant_quotas.values())
@staticmethod
def update_quota_limit(context, tenant_id, resource, limit):

@ -115,6 +115,7 @@ commands = python -m testtools.run \
neutron.tests.unit.plugins.ml2.drivers.openvswitch.agent.openflow.ovs_ofctl.test_br_phys \
neutron.tests.unit.plugins.ml2.drivers.openvswitch.agent.openflow.ovs_ofctl.test_br_int \
neutron.tests.unit.plugins.ml2.drivers.openvswitch.agent.openflow.ovs_ofctl.test_br_tun \
neutron.tests.unit.plugins.ml2.drivers.openvswitch.agent.test_agent_scheduler \
neutron.tests.unit.plugins.brocade.test_brocade_db \
neutron.tests.unit.plugins.brocade.test_brocade_vlan \
neutron.tests.unit.plugins.oneconvergence.test_nvsd_agent \
@ -152,11 +153,14 @@ commands = python -m testtools.run \
neutron.tests.unit.plugins.cisco.n1kv.test_n1kv_db \
neutron.tests.unit.plugins.cisco.n1kv.fake_client \
neutron.tests.unit.plugins.cisco.test_network_db \
neutron.tests.unit.scheduler.test_l3_agent_scheduler \
neutron.tests.unit.scheduler.test_dhcp_agent_scheduler \
neutron.tests.unit.db.test_ipam_backend_mixin \
neutron.tests.unit.db.test_l3_dvr_db \
neutron.tests.unit.db.test_l3_hamode_db \
neutron.tests.unit.db.test_migration \
neutron.tests.unit.db.test_agents_db \
neutron.tests.unit.db.test_quota_db \
neutron.tests.unit.db.test_dvr_mac_db \
neutron.tests.unit.debug.test_commands \
neutron.tests.unit.tests.test_post_mortem_debug \

Loading…
Cancel
Save