diff --git a/devstack/nsx_v3/devstackgaterc b/devstack/nsx_v3/devstackgaterc index 8eae66e6b5..04c7b0ee45 100644 --- a/devstack/nsx_v3/devstackgaterc +++ b/devstack/nsx_v3/devstackgaterc @@ -24,7 +24,13 @@ r="$r(?:tempest\.api\.network\.test_extensions\.ExtensionsTestJSON.*)" r="$r|(?:tempest\.api\.network\.test_routers\.DvrRoutersTest.*)" r="$r|(?:tempest\.api\.network\.test_routers_negative\.DvrRoutersNegativeTest.*)" -r="$r|(?:tempest\.api\.network\.test_allowed_address_pair\.AllowedAddressPairTestJSON\.test_update_port_with_cidr_address_pair*)" +r="$r|(?:tempest\.api\.network\.test_allowed_address_pair\.AllowedAddressPairTestJSON\.test_update_port_with_cidr_address_pair.*)" +#Native DHCP has no agents +r="$r|(?:tempest\.api\.network\.admin\.test_agent_management\.AgentManagementTestJSON.*)" +#Can not create more than one DHCP-enabled subnet +r="$r|(?:tempest\.api\.network\.test_ports\.PortsTestJSON\.test_create_update_port_with_second_ip.*)" +r="$r|(?:tempest\.api\.network\.test_ports\.PortsTestJSON\.test_update_port_with_security_group_and_extra_attributes.*)" +r="$r|(?:tempest\.api\.network\.test_ports\.PortsTestJSON\.test_update_port_with_two_security_groups_and_extra_attributes.*)" # End list of exclusions. r="$r)" diff --git a/vmware_nsx/nsxlib/v3/native_dhcp.py b/vmware_nsx/nsxlib/v3/native_dhcp.py index 637a3128b5..3d2f02817d 100644 --- a/vmware_nsx/nsxlib/v3/native_dhcp.py +++ b/vmware_nsx/nsxlib/v3/native_dhcp.py @@ -39,12 +39,12 @@ def build_dhcp_server_config(network, subnet, port, project_name): host_routes = [{'network': subnet['cidr'], 'next_hop': '0.0.0.0'}] # Copy routes from subnet host_routes attribute. for hr in subnet['host_routes']: - if hr.destination == constants.IPv4_ANY: + if hr['destination'] == constants.IPv4_ANY: if not gateway_ip: - gateway_ip = hr.nexthop + gateway_ip = hr['nexthop'] else: - host_routes.append({'network': hr.destination, - 'next_hop': hr.nexthop}) + host_routes.append({'network': hr['destination'], + 'next_hop': hr['nexthop']}) # If gateway_ip is defined, add default route via this gateway. if gateway_ip: host_routes.append({'network': constants.IPv4_ANY,