Merge "Disable uRPF check on lrp on container LS"

This commit is contained in:
Jenkins 2017-01-27 22:38:59 +00:00 committed by Gerrit Code Review
commit f438d502c3
2 changed files with 8 additions and 3 deletions

View File

@ -382,7 +382,8 @@ class LogicalRouterPort(AbstractRESTResource):
resource_type,
logical_port_id,
address_groups,
edge_cluster_member_index=None):
edge_cluster_member_index=None,
urpf_mode=None):
body = {'display_name': display_name,
'resource_type': resource_type,
'logical_router_id': logical_router_id,
@ -400,6 +401,8 @@ class LogicalRouterPort(AbstractRESTResource):
body['linked_logical_router_port_id'] = logical_port_id
if edge_cluster_member_index:
body['edge_cluster_member_index'] = edge_cluster_member_index
if urpf_mode:
body['urpf_mode'] = urpf_mode
return self._client.create(body=body)

View File

@ -143,7 +143,8 @@ class RouterLib(object):
tags,
ls_id,
logical_switch_port_id,
address_groups):
address_groups,
urpf_mode=None):
try:
port = self._router_port_client.get_by_lswitch_id(ls_id)
except exceptions.ResourceNotFound:
@ -153,7 +154,8 @@ class RouterLib(object):
tags,
nsx_constants.LROUTERPORT_DOWNLINK,
logical_switch_port_id,
address_groups)
address_groups,
urpf_mode=urpf_mode)
else:
return self._router_port_client.update(
port['id'], subnets=address_groups)