Merge "NSX-V: Prevent LBaaS L7 policy creation for HTTPS listeners"

This commit is contained in:
Zuul 2018-05-02 13:27:04 +00:00 committed by Gerrit Code Review
commit 1d270acbd9
1 changed files with 8 additions and 0 deletions

View File

@ -217,6 +217,14 @@ class EdgeL7PolicyManager(base_mgr.EdgeLoadbalancerBaseManager):
msg = _(
'No suitable Edge found for listener %s') % pol.listener_id
raise n_exc.BadRequest(resource='edge-lbaas', msg=msg)
if (pol.listener.protocol == lb_const.LB_PROTOCOL_HTTPS or
pol.listener.protocol == lb_const.LB_PROTOCOL_TERMINATED_HTTPS):
msg = _(
'L7 policy is not supported for %(prot)s listener %(ls)s') % {
'prot': pol.listener.protocol, 'ls': pol.listener_id}
raise n_exc.BadRequest(resource='edge-lbaas', msg=msg)
edge_id = lb_binding['edge_id']
app_rule = policy_to_application_rule(pol)
app_rule_id = None